mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-08-07 22:42:22 -04:00
compatibility: allow newer patch versions for images
Validation incorrectly prevented newer patch versions for images.
This commit is contained in:
parent
2a0b56f7b8
commit
6f9d76dd6e
3 changed files with 23 additions and 6 deletions
|
@ -87,7 +87,7 @@ func TestNextMinorVersion(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
func TestCLIWith(t *testing.T) {
|
||||
func TestBinaryWith(t *testing.T) {
|
||||
testCases := map[string]struct {
|
||||
cli string
|
||||
target string
|
||||
|
@ -107,7 +107,7 @@ func TestCLIWith(t *testing.T) {
|
|||
target: "v1.2",
|
||||
wantError: true,
|
||||
},
|
||||
"a has to be the newer version": {
|
||||
"cli has to be the newer version": {
|
||||
cli: "v2.4.0",
|
||||
target: "v2.5.0",
|
||||
wantError: true,
|
||||
|
@ -116,7 +116,7 @@ func TestCLIWith(t *testing.T) {
|
|||
cli: "v2.5.0-pre",
|
||||
target: "v2.4.0",
|
||||
},
|
||||
"pre prelease version ordering is correct #2": {
|
||||
"pre prelease versions are not forward compatible": {
|
||||
cli: "v2.4.0",
|
||||
target: "v2.5.0-pre",
|
||||
wantError: true,
|
||||
|
@ -125,11 +125,19 @@ func TestCLIWith(t *testing.T) {
|
|||
cli: "v2.6.0-pre",
|
||||
target: "v2.6.0-pre",
|
||||
},
|
||||
"pseudo version is newer than first pre release": {
|
||||
cli: "v2.6.0-pre",
|
||||
"patch versions are forward compatible": {
|
||||
cli: "v2.6.0",
|
||||
target: "v2.6.1",
|
||||
},
|
||||
"pseudo versions are not forward compatible": {
|
||||
cli: "v2.5.0",
|
||||
target: "v2.6.0-pre.0.20230125085856-aaaaaaaaaaaa",
|
||||
wantError: true,
|
||||
},
|
||||
"pseudo version is newer than first pre release": {
|
||||
cli: "v2.6.0-pre",
|
||||
target: "v2.6.0-pre.0.20230125085856-aaaaaaaaaaaa",
|
||||
},
|
||||
}
|
||||
|
||||
for name, tc := range testCases {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue