mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-05 11:12:03 +00:00
Make the check strict to use ExpectNoError()
As https://github.com/kubernetes/kubernetes/pull/78478 we can use ExpectNoError() instead of Expect(err).ToNot(HaveOccurred()) also. This makes the test code check strict to cover the above case and replaces the remaining in test/e2e/common/expansion.go
This commit is contained in:
@@ -25,7 +25,7 @@ mapfile -t all_e2e_files < <(find test/e2e -name '*.go' | grep -v 'test/e2e/fram
|
||||
errors_expect_no_error=()
|
||||
for file in "${all_e2e_files[@]}"
|
||||
do
|
||||
if grep "Expect(.*)\.NotTo(.*HaveOccurred()" "${file}" > /dev/null
|
||||
if grep -E "Expect\(.*\)\.(NotTo|ToNot)\(.*HaveOccurred\(\)" "${file}" > /dev/null
|
||||
then
|
||||
errors_expect_no_error+=( "${file}" )
|
||||
fi
|
||||
|
Reference in New Issue
Block a user