From 7b687ea78ff27266ef30a11f78572a2df9ce211b Mon Sep 17 00:00:00 2001 From: Steve Tooke Date: Fri, 13 Oct 2023 09:09:42 +0100 Subject: [PATCH] Fix tests after kosli-dev/server#90 --- cmd/kosli/getApproval_test.go | 2 +- cmd/kosli/getDeployment_test.go | 2 +- cmd/kosli/getFlow_test.go | 2 +- cmd/kosli/listApprovals_test.go | 2 +- cmd/kosli/listArtifacts_test.go | 2 +- cmd/kosli/listDeployments_test.go | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cmd/kosli/getApproval_test.go b/cmd/kosli/getApproval_test.go index 5a963de45..fde8d7f06 100644 --- a/cmd/kosli/getApproval_test.go +++ b/cmd/kosli/getApproval_test.go @@ -60,7 +60,7 @@ func (suite *GetApprovalCommandTestSuite) TestGetApprovalCmd() { wantError: true, name: "get approval on a non-existing flow fails", cmd: "get approval get-approval-123#20" + suite.defaultKosliArguments, - golden: "Error: Flow called 'get-approval-123' does not exist for organization 'docs-cmd-test-user'\n", + golden: "Error: Flow named 'get-approval-123' does not exist for organization 'docs-cmd-test-user'\n", }, { wantError: true, diff --git a/cmd/kosli/getDeployment_test.go b/cmd/kosli/getDeployment_test.go index 91dbf141d..03e9ccfb8 100644 --- a/cmd/kosli/getDeployment_test.go +++ b/cmd/kosli/getDeployment_test.go @@ -69,7 +69,7 @@ func (suite *GetDeploymentCommandTestSuite) TestGetDeploymentCmd() { wantError: true, name: "get deployment fails when flow does not exist", cmd: `get deployment foo#1` + suite.defaultKosliArguments, - golden: "Error: Flow called 'foo' does not exist for organization 'docs-cmd-test-user'. \n", + golden: "Error: Flow named 'foo' does not exist for organization 'docs-cmd-test-user'. \n", }, { wantError: true, diff --git a/cmd/kosli/getFlow_test.go b/cmd/kosli/getFlow_test.go index 901af93fc..d01698d8d 100644 --- a/cmd/kosli/getFlow_test.go +++ b/cmd/kosli/getFlow_test.go @@ -34,7 +34,7 @@ func (suite *GetFlowCommandTestSuite) TestGetFlowCmd() { wantError: true, name: "getting a non existing flow fails", cmd: fmt.Sprintf(`get flow non-existing %s`, suite.defaultKosliArguments), - golden: "Error: Flow called 'non-existing' does not exist for organization 'docs-cmd-test-user'\n", + golden: "Error: Flow named 'non-existing' does not exist for organization 'docs-cmd-test-user'\n", }, { wantError: true, diff --git a/cmd/kosli/listApprovals_test.go b/cmd/kosli/listApprovals_test.go index 8bf717e0d..38ebdf21f 100644 --- a/cmd/kosli/listApprovals_test.go +++ b/cmd/kosli/listApprovals_test.go @@ -56,7 +56,7 @@ func (suite *ListApprovalsCommandTestSuite) TestListApprovalsCmd() { wantError: true, name: "non-existing flow causes an error", cmd: fmt.Sprintf(`list approvals --flow non-existing %s`, suite.defaultKosliArguments), - golden: "Error: Flow called 'non-existing' does not exist for organization 'docs-cmd-test-user'\n", + golden: "Error: Flow named 'non-existing' does not exist for organization 'docs-cmd-test-user'\n", }, // TODO: the correct error is overwritten by the hack flag value check in root.go { diff --git a/cmd/kosli/listArtifacts_test.go b/cmd/kosli/listArtifacts_test.go index f4dc35742..c35bdef94 100644 --- a/cmd/kosli/listArtifacts_test.go +++ b/cmd/kosli/listArtifacts_test.go @@ -55,7 +55,7 @@ func (suite *ListArtifactsCommandTestSuite) TestListArtifactsCmd() { wantError: true, name: "non-existing flow causes an error", cmd: fmt.Sprintf(`list artifacts --flow non-existing %s`, suite.defaultKosliArguments), - golden: "Error: Flow called 'non-existing' does not exist for organization 'docs-cmd-test-user'. \n", + golden: "Error: Flow named 'non-existing' does not exist for organization 'docs-cmd-test-user'. \n", }, // TODO: the correct error is overwritten by the hack flag value check in root.go { diff --git a/cmd/kosli/listDeployments_test.go b/cmd/kosli/listDeployments_test.go index 778300f91..03e3a521d 100644 --- a/cmd/kosli/listDeployments_test.go +++ b/cmd/kosli/listDeployments_test.go @@ -59,7 +59,7 @@ func (suite *ListDeploymentsCommandTestSuite) TestListDeploymentsCmd() { wantError: true, name: "non-existing flow causes an error", cmd: fmt.Sprintf(`list deployments --flow non-existing %s`, suite.defaultKosliArguments), - golden: "Error: Flow called 'non-existing' does not exist for organization 'docs-cmd-test-user'\n", + golden: "Error: Flow named 'non-existing' does not exist for organization 'docs-cmd-test-user'\n", }, // TODO: the correct error is overwritten by the hack flag value check in root.go {