Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
korotkov-aerospike committed Oct 17, 2023
1 parent 2b07841 commit da91a3b
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions pkg/service/configuration_service_policy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,8 @@ func TestUpdatePolicy(t *testing.T) {
}

err := UpdatePolicy(config, updatedPolicy)
expectedError := "Policy policy2 not found"
if err.Error() != expectedError {
t.Errorf("UpdatePolicy failed, expected error %s, got %v", expectedError, err)
if err == nil {
t.Errorf("UpdatePolicy failed, expected nil error, got %v", err)
}

updatedPolicy.Name = ptr.String("policy1")
Expand All @@ -79,9 +78,8 @@ func TestDeletePolicy(t *testing.T) {
}

err := DeletePolicy(config, ptr.String("policy2"))
expectedError := "Policy policy2 not found"
if err.Error() != expectedError {
t.Errorf("DeletePolicy failed, expected error %s, got %v", expectedError, err)
if err == nil {
t.Errorf("DeletePolicy failed, expected nil error, got %v", err)
}

err = DeletePolicy(config, ptr.String("policy1"))
Expand Down

0 comments on commit da91a3b

Please sign in to comment.