Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .snyk
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ ignore:
SNYK-GOLANG-GOLANGORGXCRYPTOSSHAGENT-12668891:
- "*":
reason: No fix available
expires: 2025-10-17T05:18:46.481Z
expires: 2025-11-17T05:18:46.481Z
created: 2025-09-17T05:18:46.483Z
patch: {}
exclude:
Expand Down
8 changes: 4 additions & 4 deletions cmd/kosli/getDeployment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ func (suite *GetDeploymentCommandTestSuite) TestGetDeploymentCmd() {
"Usage: kosli get deployment EXPRESSION [flags]\n",
},
{
wantError: true,
name: "get deployment fails when flow does not exist",
cmd: `get deployment foo#1` + suite.defaultKosliArguments,
golden: "Error: Flow named 'foo' does not exist for organization 'docs-cmd-test-user'. \n",
wantError: true,
name: "get deployment fails when flow does not exist",
cmd: `get deployment foo#1` + suite.defaultKosliArguments,
goldenRegex: "^Error: Flow named 'foo' does not exist for organization 'docs-cmd-test-user'",
},
{
wantError: true,
Expand Down
8 changes: 4 additions & 4 deletions cmd/kosli/getEnvironment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ func (suite *GetEnvironmentCommandTestSuite) TestGetEnvironmentCmd() {
golden: "",
},
{
wantError: true,
name: "trying to get non-existing env fails",
cmd: "get environment non-existing" + suite.defaultKosliArguments,
golden: "Error: Environment named 'non-existing' does not exist for organization 'docs-cmd-test-user'. \n",
wantError: true,
name: "trying to get non-existing env fails",
cmd: "get environment non-existing" + suite.defaultKosliArguments,
goldenRegex: "^Error: Environment named 'non-existing' does not exist for organization 'docs-cmd-test-user'",
},
{
wantError: true,
Expand Down
14 changes: 7 additions & 7 deletions cmd/kosli/listDeployments_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ func (suite *ListDeploymentsCommandTestSuite) TestListDeploymentsCmd() {
golden: "Error: required flag(s) \"flow\" not set\n",
},
{
wantError: true,
name: "non-existing flow causes an error",
cmd: fmt.Sprintf(`list deployments --flow non-existing %s`, suite.defaultKosliArguments),
golden: "Error: Flow named 'non-existing' does not exist for organization 'docs-cmd-test-user'\n",
wantError: true,
name: "non-existing flow causes an error",
cmd: fmt.Sprintf(`list deployments --flow non-existing %s`, suite.defaultKosliArguments),
goldenRegex: "^Error: Flow named 'non-existing' does not exist for organization 'docs-cmd-test-user'",
},
// TODO: the correct error is overwritten by the hack flag value check in root.go
{
Expand Down Expand Up @@ -91,9 +91,9 @@ func (suite *ListDeploymentsCommandTestSuite) TestListDeploymentsCmd() {
golden: "No deployments were found at page number 2.\n",
},
{
name: "listing deployments on an empty flow with --output json works",
cmd: fmt.Sprintf(`list deployments --flow %s --output json %s`, suite.flowName1, suite.defaultKosliArguments),
golden: "[]\n",
name: "listing deployments on an empty flow with --output json works",
cmd: fmt.Sprintf(`list deployments --flow %s --output json %s`, suite.flowName1, suite.defaultKosliArguments),
goldenJson: []jsonCheck{{"", "[]"}},
},
{
name: "listing deployments on a flow works",
Expand Down