kubernetes/test/e2e/framework/pod
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
..
output e2e: use error wrapping with %w 2023-02-06 15:39:13 +01:00
create.go e2e: use error wrapping with %w 2023-02-06 15:39:13 +01:00
delete.go e2e: use error wrapping with %w 2023-02-06 15:39:13 +01:00
dial.go e2e: use error wrapping with %w 2023-02-06 15:39:13 +01:00
exec_util.go e2e: use Ginkgo context 2022-12-16 20:14:04 +01:00
get.go e2e framework/pod: add Get helper 2023-01-16 09:05:37 +01:00
node_selection.go e2e: avoid setting NodeName for CSI driver deployments 2020-02-26 10:33:29 +01:00
pod_client.go e2e: use error wrapping with %w 2023-02-06 15:39:13 +01:00
resource.go e2e: use error wrapping with %w 2023-02-06 15:39:13 +01:00
resource_test.go e2e: use Ginkgo context 2022-12-16 20:14:04 +01:00
utils.go test/e2e: Replace deprecated pointer function 2023-01-05 18:43:58 +01:00
utils_test.go Add MixinRestrictedPodSecurity e2e util 2022-05-24 16:10:16 -07:00
wait.go e2e pod: remove dead code 2023-02-06 15:39:13 +01:00
wait_test.go e2e pod: unit test for pod status + API error 2023-02-06 15:39:13 +01:00