Skip to content

Commit

Permalink
Merge pull request #20 from conduktor/cons-862-consistent-message-bet…
Browse files Browse the repository at this point in the history
…ween-live-dry-run

Consistent message between live and dry run
  • Loading branch information
strokyl authored Mar 20, 2024
2 parents 6819870 + 2c75ec2 commit a4fd8ca
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
9 changes: 0 additions & 9 deletions client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,6 @@ func (client *Client) Apply(resource *resource.Resource, dryMode bool) (string,
if err != nil {
return resp.String(), nil
}
if dryMode && upsertResponse.UpsertResult == "Created" {
return "To be created", nil
}
if dryMode && upsertResponse.UpsertResult == "Updated" {
return "To be updated", nil
}
if dryMode && upsertResponse.UpsertResult == "NotChanged" {
return "Nothing to do", nil
}
return upsertResponse.UpsertResult, nil
}

Expand Down
2 changes: 1 addition & 1 deletion client/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func TestApplyWithDryModeShouldWork(t *testing.T) {
if err != nil {
t.Error(err)
}
if body != "Nothing to do" {
if body != "NotChanged" {
t.Errorf("Bad result expected NotChanged got: %s", body)
}
}
Expand Down

0 comments on commit a4fd8ca

Please sign in to comment.