Skip to content

Commit

Permalink
Consistent message between live and dry run
Browse files Browse the repository at this point in the history
  • Loading branch information
strokyl committed Mar 20, 2024
1 parent 6819870 commit 2c75ec2
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 2c75ec2

Please sign in to comment.