Skip to content

Commit

Permalink
Improved error checking
Browse files Browse the repository at this point in the history
  • Loading branch information
denis256 committed May 29, 2023
1 parent 14a7f8d commit 56bce92
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion modules/terraform/workspace_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,9 @@ func TestWorkspaceDeleteE(t *testing.T) {

// Check for errors
if testCase.expectedError != nil {
assert.True(t, errors.As(gotErr, &testCase.expectedError))
if !errors.Is(gotErr, testCase.expectedError) {
t.Errorf("expected error: %v, got error: %v", testCase.expectedError, gotErr)
}
} else {
assert.NoError(t, gotErr)
// Check for results
Expand Down

0 comments on commit 56bce92

Please sign in to comment.