Skip to content

Commit

Permalink
Merge pull request #18717 from mmorel-35/deprecated-assert
Browse files Browse the repository at this point in the history
deprecate testutil/assert.go
  • Loading branch information
ahrtr authored Oct 13, 2024
2 parents f8962c6 + 8c29d78 commit d6412f4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions client/pkg/testutil/assert.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,31 @@ import (
"github.com/stretchr/testify/assert"
)

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

// AssertNotNil
// 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)
}
}

// AssertTrue
// 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)
}

// AssertFalse
// 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 d6412f4

Please sign in to comment.