Skip to content

Commit

Permalink
revert tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sami-alajrami committed Oct 21, 2024
1 parent 2b0493d commit 057d596
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cmd/kosli/beginTrail_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion cmd/kosli/createEnvironment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion cmd/kosli/createFlow_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)",
Expand Down
2 changes: 1 addition & 1 deletion cmd/kosli/renameEnvironment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion cmd/kosli/renameFlow_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 057d596

Please sign in to comment.