kubernetes/test/e2e/storage/utils
Patrick Ohly 136f89dfc5 e2e: use error wrapping with %w
The recently introduced failure handling in ExpectNoError depends on error
wrapping: if an error prefix gets added with `fmt.Errorf("foo: %v", err)`, then
ExpectNoError cannot detect that the root cause is an assertion failure and
then will add another useless "unexpected error" prefix and will not dump the
additional failure information (currently the backtrace inside the E2E
framework).

Instead of manually deciding on a case-by-case basis where %w is needed, all
error wrapping was updated automatically with

    sed -i "s/fmt.Errorf\(.*\): '*\(%s\|%v\)'*\",\(.* err)\)/fmt.Errorf\1: %w\",\3/" $(git grep -l 'fmt.Errorf' test/e2e*)

This may be unnecessary in some cases, but it's not wrong.
2023-02-06 15:39:13 +01:00
..
create.go Merge pull request #113973 from my-git9/invalidurl 2023-01-30 18:42:48 -08:00
deployment.go Start adding e2e for recovery from expansion failure 2022-12-14 15:28:05 -05:00
ebs.go e2e: use error wrapping with %w 2023-02-06 15:39:13 +01:00
framework.go update ginkgo from v1 to v2 and gomega to 1.19.0 2022-07-08 10:44:46 +08:00
host_exec.go test: Update Host Exec to support node e2e 2023-01-26 00:37:01 -08:00
local.go e2e: use Ginkgo context 2022-12-16 20:14:04 +01:00
pod.go e2e: use Ginkgo context 2022-12-16 20:14:04 +01:00
snapshot.go e2e: use Ginkgo context 2022-12-16 20:14:04 +01:00
utils_test.go Extract testsuite api to a separate package 2020-12-10 11:12:51 -08:00
utils.go e2e: use Ginkgo context 2022-12-16 20:14:04 +01:00