e2e: use Ginkgo context

All code must use the context from Ginkgo when doing API calls or polling for a
change, otherwise the code would not return immediately when the test gets
aborted.
This commit is contained in:
Patrick Ohly
2022-12-12 10:11:10 +01:00
parent bf1d1dfd0f
commit 2f6c4f5eab
418 changed files with 11489 additions and 11369 deletions

View File

@@ -60,7 +60,7 @@ var _ = SIGDescribe("HostPath", func() {
fmt.Sprintf("--fs_type=%v", volumePath),
fmt.Sprintf("--file_mode=%v", volumePath),
}
e2epodoutput.TestContainerOutputRegexp(f, "hostPath mode", pod, 0, []string{
e2epodoutput.TestContainerOutputRegexp(ctx, f, "hostPath mode", pod, 0, []string{
"mode of file \"/test-volume\": dg?trwxrwx", // we expect the sticky bit (mode flag t) to be set for the dir
})
})
@@ -89,7 +89,7 @@ var _ = SIGDescribe("HostPath", func() {
}
//Read the content of the file with the second container to
//verify volumes being shared properly among containers within the pod.
e2epodoutput.TestContainerOutput(f, "hostPath r/w", pod, 1, []string{
e2epodoutput.TestContainerOutput(ctx, f, "hostPath r/w", pod, 1, []string{
"content of file \"/test-volume/test-file\": mount-tester new file",
})
})
@@ -126,7 +126,7 @@ var _ = SIGDescribe("HostPath", func() {
fmt.Sprintf("--retry_time=%d", retryDuration),
}
e2epodoutput.TestContainerOutput(f, "hostPath subPath", pod, 1, []string{
e2epodoutput.TestContainerOutput(ctx, f, "hostPath subPath", pod, 1, []string{
"content of file \"" + filePathInReader + "\": mount-tester new file",
})
})