Skip to content

Commit

Permalink
test: use require instead of assert
Browse files Browse the repository at this point in the history
If test case can not continues
  • Loading branch information
handlename committed Dec 23, 2024
1 parent f265474 commit a907cd1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions internal/infra/aws/aws_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"testing"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)

func Test_App_IsReadonly(t *testing.T) {
Expand Down Expand Up @@ -82,12 +83,12 @@ func Test_App_IsReadonly(t *testing.T) {
t.Run(fmt.Sprintf("%t: %v", tt.want, tt.argv), func(t *testing.T) {
got, err := asvc.IsReadonly(tt.argv)
if tt.wantErr {
assert.Error(t, err)
require.Error(t, err)
assert.Contains(t, err.Error(), tt.errBody)
return
}

assert.NoError(t, err)
require.NoError(t, err)
assert.Equal(t, tt.want, got)
})
}
Expand Down

0 comments on commit a907cd1

Please sign in to comment.