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:
Yong Tang
2017-08-26 19:09:27 -07:00
committed by GitHub
12 changed files with 11 additions and 11 deletions
-13
View File
@@ -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)
}