mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-08-11 08:20:16 -04:00
versionsapi: change image path (#856)
Signed-off-by: Paul Meyer <49727155+katexochen@users.noreply.github.com>
This commit is contained in:
parent
3a359aea65
commit
f9458950cb
11 changed files with 49 additions and 53 deletions
|
@ -373,7 +373,7 @@ func TestVersionListPathURL(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
func TestVersionImagePath(t *testing.T) {
|
||||
func TestVersionArtifactPath(t *testing.T) {
|
||||
testCases := map[string]struct {
|
||||
ver Version
|
||||
wantPath string
|
||||
|
@ -385,7 +385,7 @@ func TestVersionImagePath(t *testing.T) {
|
|||
Version: "v9.9.9",
|
||||
Kind: VersionKindImage,
|
||||
},
|
||||
wantPath: constants.CDNAPIPrefix + "/ref/" + ReleaseRef + "/stream/stable/image/v9.9.9",
|
||||
wantPath: constants.CDNAPIPrefix + "/ref/" + ReleaseRef + "/stream/stable/v9.9.9",
|
||||
},
|
||||
"release debug stream": {
|
||||
ver: Version{
|
||||
|
@ -394,7 +394,7 @@ func TestVersionImagePath(t *testing.T) {
|
|||
Version: "v9.9.9",
|
||||
Kind: VersionKindImage,
|
||||
},
|
||||
wantPath: constants.CDNAPIPrefix + "/ref/" + ReleaseRef + "/stream/debug/image/v9.9.9",
|
||||
wantPath: constants.CDNAPIPrefix + "/ref/" + ReleaseRef + "/stream/debug/v9.9.9",
|
||||
},
|
||||
"branch ref": {
|
||||
ver: Version{
|
||||
|
@ -403,7 +403,7 @@ func TestVersionImagePath(t *testing.T) {
|
|||
Version: "v9.9.9",
|
||||
Kind: VersionKindImage,
|
||||
},
|
||||
wantPath: constants.CDNAPIPrefix + "/ref/foo/stream/debug/image/v9.9.9",
|
||||
wantPath: constants.CDNAPIPrefix + "/ref/foo/stream/debug/v9.9.9",
|
||||
},
|
||||
}
|
||||
|
||||
|
@ -411,7 +411,7 @@ func TestVersionImagePath(t *testing.T) {
|
|||
t.Run(name, func(t *testing.T) {
|
||||
assert := assert.New(t)
|
||||
|
||||
path := tc.ver.ImagePath()
|
||||
path := tc.ver.ArtifactPath()
|
||||
assert.Equal(tc.wantPath, path)
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue