AB#1898 cli: fix create aws arg validation

This commit is contained in:
Thomas Tendyck 2022-04-07 10:56:32 +02:00 committed by Thomas Tendyck
parent 393c1f7dd1
commit f0dc48e3c7
2 changed files with 1 additions and 2 deletions

View File

@ -24,7 +24,7 @@ func newCreateAWSCmd() *cobra.Command {
Args: cobra.MatchAll(
cobra.ExactArgs(3),
isValidAWSCoordinatorCount(0),
isIntGreaterArg(1, 1),
isIntGreaterZeroArg(1),
isEC2InstanceType(2),
),
ValidArgsFunction: createAWSCompletion,

View File

@ -32,7 +32,6 @@ func TestCreateAWSCmdArgumentValidation(t *testing.T) {
"valid short capitalized": {[]string{"1", "4", "16XL"}, false},
"invalid to many arguments": {[]string{"1", "2", "4xl", "2xl"}, true},
"invalid to many arguments 2": {[]string{"1", "2", "4xl", "2"}, true},
"invalidOnlyOneInstance": {[]string{"1", "1", "4xl"}, true},
"invalid first is no int": {[]string{"xl", "2", "4xl"}, true},
"invalid first is not 1": {[]string{"2", "2", "4xl"}, true},
"invalid second is no int": {[]string{"1", "xl", "4xl"}, true},