Skip to content

Commit 3984716

Browse files
committed
PRODENG-3129 invalid MCR config crashes launchpad
- use reported mcr config which causes crash in launchpa Signed-off-by: James Nesbitt <[email protected]>
1 parent f98e8b9 commit 3984716

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

pkg/product/common/api/mcr_config_validate_test.go

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,16 @@ func Test_ValidateInvalidVersion(t *testing.T) {
5959
require.ErrorIs(t, config.Validate(), commonapi.ErrInvalidVersion, "did not receive expected error from invalid MCR config version")
6060
}
6161

62+
// invalid version passed: reported in PRODENG-3129
63+
func Test_ValidateInvalidVersion_PRODENG3129(t *testing.T) {
64+
config := commonapi.MCRConfig{
65+
Version: "25.0.8m1-1",
66+
Channel: "stable-25.0.9",
67+
}
68+
69+
require.Error(t, config.Validate(), "did not receive expected error from invalid MCR config version (PRODENG-3129)")
70+
}
71+
6272
// if a full maj.min.pat version is passed, then the channel should have the full maj.min.pat part
6373
func Test_ValidateMissingChannelVersion(t *testing.T) {
6474
config := commonapi.MCRConfig{
@@ -162,4 +172,5 @@ func Test_ValidateInternalBuildFIPS(t *testing.T) {
162172
}
163173

164174
require.Nil(t, config.Validate(), "received unexpected error for valid MCR config which contains internal build suffix -tp1 w/ FIPS")
165-
}
175+
}
176+

0 commit comments

Comments
 (0)