diff --git a/cmd/kosli/beginTrail_test.go b/cmd/kosli/beginTrail_test.go index a4b81336..71b4dbe0 100644 --- a/cmd/kosli/beginTrail_test.go +++ b/cmd/kosli/beginTrail_test.go @@ -39,7 +39,7 @@ func (suite *BeginTrailCommandTestSuite) TestBeginTrailCmd() { wantError: true, name: "fails when name is considered invalid by the server", cmd: fmt.Sprintf("begin trail foo?$bar --flow %s %s", suite.flowName, suite.defaultKosliArguments), - golden: "Error: Input payload validation failed: map[name:'foo?$bar' does not match '^[a-zA-Z0-9][a-zA-Z0-9\\\\-_\\\\.~]*$']\n", + golden: "Error: Input payload validation failed: map[name:'foo?$bar' does not match '^[a-zA-Z0-9][a-zA-Z0-9\\\\.\\\\-_~]*$']\n", }, { wantError: true, diff --git a/cmd/kosli/createEnvironment_test.go b/cmd/kosli/createEnvironment_test.go index 6204c290..163db34e 100644 --- a/cmd/kosli/createEnvironment_test.go +++ b/cmd/kosli/createEnvironment_test.go @@ -100,7 +100,7 @@ func (suite *CreateEnvironmentCommandTestSuite) TestCreateEnvironmentCmd() { wantError: true, name: "fails when name is considered invalid by the server", cmd: "create env 'foo bar' --type K8S" + suite.defaultKosliArguments, - golden: "Error: Input payload validation failed: map[name:'foo bar' does not match '^[a-zA-Z][a-zA-Z0-9\\\\-]*$']\n", + golden: "Error: Input payload validation failed: map[name:'foo bar' does not match '^[a-zA-Z0-9][a-zA-Z0-9\\\\.\\\\-_~]*$']\n", }, { wantError: false, diff --git a/cmd/kosli/createFlow_test.go b/cmd/kosli/createFlow_test.go index 17a47dd4..47110030 100644 --- a/cmd/kosli/createFlow_test.go +++ b/cmd/kosli/createFlow_test.go @@ -36,7 +36,7 @@ func (suite *CreateFlowCommandTestSuite) TestCreateFlowCmd() { wantError: true, name: "fails when name is considered invalid by the server", cmd: "create flow 'foo bar'" + suite.defaultKosliArguments, - golden: "Error: Input payload validation failed: map[name:'foo bar' does not match '^[a-zA-Z0-9\\\\-\\\\.]+$']\n", + golden: "Error: Input payload validation failed: map[name:'foo bar' does not match '^[a-zA-Z0-9][a-zA-Z0-9\\\\.\\\\-_~]*$']\n", }, { name: "can create a flow (by default legacy template is used)", diff --git a/cmd/kosli/renameEnvironment_test.go b/cmd/kosli/renameEnvironment_test.go index b2e2623e..2e946c65 100644 --- a/cmd/kosli/renameEnvironment_test.go +++ b/cmd/kosli/renameEnvironment_test.go @@ -39,7 +39,7 @@ func (suite *RenameEnvironmentCommandTestSuite) TestRenameEnvironmentCmd() { wantError: true, name: "renaming environment fails if the new name is illegal", cmd: fmt.Sprintf(`rename environment %s 'new illegal name' %s`, suite.envName, suite.defaultKosliArguments), - golden: "Error: 'new illegal name' is an invalid name for environments. Valid names should start with a letter and can contain alphanumeric characters and '-'.\n", + golden: "Error: 'new illegal name' is an invalid name for environments. Valid names should start with an alphanumeric and only contain alphanumeric characters, '.', '-', '_' and '~'.\n", }, { wantError: true, diff --git a/cmd/kosli/renameFlow_test.go b/cmd/kosli/renameFlow_test.go index 623b110e..aa491c40 100644 --- a/cmd/kosli/renameFlow_test.go +++ b/cmd/kosli/renameFlow_test.go @@ -39,7 +39,7 @@ func (suite *RenameFlowCommandTestSuite) TestRenameFlowCmd() { wantError: true, name: "renaming flow fails if the new name is illegal", cmd: fmt.Sprintf(`rename flow %s 'new illegal name' %s`, suite.flowName, suite.defaultKosliArguments), - golden: "Error: 'new illegal name' is an invalid name for flows. Valid names should only contain alphanumeric characters, '.', and '-'.\n", + golden: "Error: 'new illegal name' is an invalid name for flows. Valid names should start with an alphanumeric and only contain alphanumeric characters, '.', '-', '_' and '~'.\n", }, { wantError: true,