Merge pull request #34615 from dnephin/remove-pkg-testutil-assert
Move ErrorContains to an internal package Upstream-commit: 6ed5db6243243c8b7ee3ff165f21bda4465124e5 Component: engine
This commit is contained in:
@@ -1,13 +0,0 @@
|
||||
package testutil
|
||||
|
||||
import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
// ErrorContains checks that the error is not nil, and contains the expected
|
||||
// substring.
|
||||
func ErrorContains(t require.TestingT, err error, expectedError string) {
|
||||
require.Error(t, err)
|
||||
assert.Contains(t, err.Error(), expectedError)
|
||||
}
|
||||
Reference in New Issue
Block a user