kubernetes/test/e2e/storage
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
..
csi_mock e2e: use error wrapping with %w 2023-02-06 15:39:13 +01:00
drivers e2e: use error wrapping with %w 2023-02-06 15:39:13 +01:00
external e2e: move several timeouts from TestContext into TimeoutContext 2023-01-09 17:29:35 +01:00
framework e2e: move several timeouts from TestContext into TimeoutContext 2023-01-09 17:29:35 +01:00
podlogs Generate and format files 2022-07-26 13:14:05 -04:00
testsuites e2e: use error wrapping with %w 2023-02-06 15:39:13 +01:00
utils e2e: use error wrapping with %w 2023-02-06 15:39:13 +01:00
vsphere e2e: use error wrapping with %w 2023-02-06 15:39:13 +01:00
csi_inline.go e2e: use Ginkgo context 2022-12-16 20:14:04 +01:00
csi_volumes.go update ginkgo from v1 to v2 and gomega to 1.19.0 2022-07-08 10:44:46 +08:00
csistoragecapacity.go e2e: use Ginkgo context 2022-12-16 20:14:04 +01:00
detach_mounted.go e2e: use Ginkgo context 2022-12-16 20:14:04 +01:00
empty_dir_wrapper.go e2e: use Ginkgo context 2022-12-16 20:14:04 +01:00
ephemeral_volume.go e2e: use Ginkgo context 2022-12-16 20:14:04 +01:00
flexvolume_mounted_volume_resize.go e2e: move several timeouts from TestContext into TimeoutContext 2023-01-09 17:29:35 +01:00
flexvolume_online_resize.go e2e: use error wrapping with %w 2023-02-06 15:39:13 +01:00
flexvolume.go e2e storage: remove WaitForPodTerminatedInNamespace 2023-02-06 15:39:12 +01:00
generic_persistent_volume-disruptive.go e2e: use Ginkgo context 2022-12-16 20:14:04 +01:00
gke_local_ssd.go e2e: use Ginkgo context 2022-12-16 20:14:04 +01:00
host_path_type.go e2e: use Ginkgo context 2022-12-16 20:14:04 +01:00
in_tree_volumes.go Revert "Remove references to openstack and cinder" 2022-11-10 18:25:30 +01:00
local_volume_resize.go e2e: use error wrapping with %w 2023-02-06 15:39:13 +01:00
mounted_volume_resize.go e2e: use error wrapping with %w 2023-02-06 15:39:13 +01:00
nfs_persistent_volume-disruptive.go e2e: use Ginkgo context 2022-12-16 20:14:04 +01:00
non_graceful_node_shutdown.go e2e: consolidate checking a pod list 2023-02-06 15:39:12 +01:00
OWNERS Validate OWNERS files - remove sections about emeritus reviewers 2022-01-13 20:40:01 -05:00
pd.go e2e: use error wrapping with %w 2023-02-06 15:39:13 +01:00
persistent_volumes-gce.go e2e: use Ginkgo context 2022-12-16 20:14:04 +01:00
persistent_volumes-local.go e2e: use error wrapping with %w 2023-02-06 15:39:13 +01:00
persistent_volumes.go e2e: use error wrapping with %w 2023-02-06 15:39:13 +01:00
pv_protection.go e2e: move several timeouts from TestContext into TimeoutContext 2023-01-09 17:29:35 +01:00
pvc_protection.go e2e: move several timeouts from TestContext into TimeoutContext 2023-01-09 17:29:35 +01:00
pvc_storageclass.go e2e: use error wrapping with %w 2023-02-06 15:39:13 +01:00
regional_pd.go e2e: move several timeouts from TestContext into TimeoutContext 2023-01-09 17:29:35 +01:00
subpath.go e2e: use Ginkgo context 2022-12-16 20:14:04 +01:00
ubernetes_lite_volumes.go e2e: replace WaitForPodToDisappear with WaitForPodNotFoundInNamespace 2023-02-06 15:39:12 +01:00
volume_metrics.go wait: ExponentialBackoffWithContext should take context-aware fn 2023-01-16 14:57:57 -05:00
volume_provisioning.go e2e: use error wrapping with %w 2023-02-06 15:39:13 +01:00
volumes.go e2e: use Ginkgo context 2022-12-16 20:14:04 +01:00