diff --git a/hack/.staticcheck_failures b/hack/.staticcheck_failures index 19ede10fe4c..1692dd2f524 100644 --- a/hack/.staticcheck_failures +++ b/hack/.staticcheck_failures @@ -88,7 +88,6 @@ test/e2e/lifecycle test/e2e/lifecycle/bootstrap test/e2e/manifest test/e2e/network -test/e2e/node test/e2e/storage test/e2e/storage/drivers test/e2e/storage/testsuites diff --git a/test/e2e/node/node_problem_detector.go b/test/e2e/node/node_problem_detector.go index 6c673ca8eee..3b365b0f9fd 100644 --- a/test/e2e/node/node_problem_detector.go +++ b/test/e2e/node/node_problem_detector.go @@ -281,7 +281,9 @@ func getCPUStat(f *framework.Framework, host string) (usage, uptime float64) { lines := strings.Split(result.Stdout, "\n") usage, err = strconv.ParseFloat(lines[0], 64) + framework.ExpectNoError(err, "Cannot parse float for usage") uptime, err = strconv.ParseFloat(lines[1], 64) + framework.ExpectNoError(err, "Cannot parse float for uptime") // Convert from nanoseconds to seconds usage *= 1e-9 diff --git a/test/e2e/node/pod_gc.go b/test/e2e/node/pod_gc.go index 8aa4a030804..b1e680e173c 100644 --- a/test/e2e/node/pod_gc.go +++ b/test/e2e/node/pod_gc.go @@ -39,9 +39,12 @@ var _ = SIGDescribe("Pod garbage collector [Feature:PodGarbageCollector] [Slow]" var count int for count < 1000 { pod, err := createTerminatingPod(f) + if err != nil { + framework.Failf("err creating pod: %v", err) + } pod.ResourceVersion = "" pod.Status.Phase = v1.PodFailed - pod, err = f.ClientSet.CoreV1().Pods(f.Namespace.Name).UpdateStatus(pod) + _, err = f.ClientSet.CoreV1().Pods(f.Namespace.Name).UpdateStatus(pod) if err != nil { framework.Failf("err failing pod: %v", err) } diff --git a/test/e2e/node/pre_stop.go b/test/e2e/node/pre_stop.go index 9c7d9fef0c9..c2628f67256 100644 --- a/test/e2e/node/pre_stop.go +++ b/test/e2e/node/pre_stop.go @@ -223,6 +223,8 @@ var _ = SIGDescribe("PreStop", func() { } return false, err }) + + framework.ExpectNoError(err, "validate-pod-is-running") }) }) diff --git a/test/e2e/node/security_context.go b/test/e2e/node/security_context.go index 64df40c3ae8..2051f5324c2 100644 --- a/test/e2e/node/security_context.go +++ b/test/e2e/node/security_context.go @@ -267,5 +267,6 @@ func testPodSELinuxLabeling(f *framework.Framework, hostIPC bool, hostPID bool) framework.ExpectNoError(err, "Error waiting for pod to run %v", pod) content, err = f.ReadFileViaContainer(pod.Name, "test-container", testFilePath) + framework.ExpectNoError(err, "Error reading file via container") gomega.Expect(content).NotTo(gomega.ContainSubstring(testContent)) }