Skip to content

Commit

Permalink
deprecate testutil/assert.go
Browse files Browse the repository at this point in the history
Signed-off-by: Matthieu MOREL <[email protected]>
  • Loading branch information
mmorel-35 committed Oct 11, 2024
1 parent f0187c3 commit 5140632
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions client/pkg/testutil/assert.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,27 @@ import (
"github.com/stretchr/testify/assert"
)

// Deprecated: use github.com/stretchr/testify/assert.Nil instead.
func AssertNil(t *testing.T, v any) {
t.Helper()
assert.Nil(t, v)
}

// Deprecated: use github.com/stretchr/testify/require.NotNil instead.
func AssertNotNil(t *testing.T, v any) {
t.Helper()
if v == nil {
t.Fatalf("expected non-nil, got %+v", v)
}
}

// Deprecated: use github.com/stretchr/testify/assert.True instead.
func AssertTrue(t *testing.T, v bool, msg ...string) {
t.Helper()
assert.True(t, v, msg)
}

// Deprecated: use github.com/stretchr/testify/assert.False instead.
func AssertFalse(t *testing.T, v bool, msg ...string) {
t.Helper()
assert.False(t, v, msg)
Expand Down

0 comments on commit 5140632

Please sign in to comment.