Skip to content

Commit a5bcfe0

Browse files
committed
add maxOpenShiftVersion test for parsing full version string (#147)
Signed-off-by: Ankita Thomas <[email protected]> Upstream-repository: api Upstream-commit: 6db422fda8df2f7872a493dd696152eaf2e8a4da
1 parent 9caf73f commit a5bcfe0

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

staging/api/pkg/validation/internal/community_test.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,17 @@ func Test_communityValidator(t *testing.T) {
118118
"Warning: Value : (etcdoperator.v0.9.4) csv.Annotations.olm.properties has an invalid value. olm.maxOpenShiftVersion must specify only major.minor versions, 4.8.1 will be truncated to 4.8.0",
119119
},
120120
},
121+
{
122+
name: "should pass when the maxOpenShiftVersion is semantically equivalent to <major>.<minor>.0",
123+
wantError: false,
124+
args: args{
125+
bundleDir: "./testdata/valid_bundle_v1beta1",
126+
imageIndexPath: "./testdata/dockerfile/valid_bundle.Dockerfile",
127+
annotations: map[string]string{
128+
"olm.properties": fmt.Sprintf(`[{"type": "olm.maxOpenShiftVersion", "value": "4.8.0+build"}]`),
129+
},
130+
},
131+
},
121132
}
122133

123134
for _, tt := range tests {

0 commit comments

Comments
 (0)