From dec4650f732c60bdb85e830b386fd03530f441fc Mon Sep 17 00:00:00 2001 From: Pengfei Ni Date: Fri, 3 Jan 2025 13:08:48 +0800 Subject: [PATCH] chore: fix typos lint error --- pkg/validate/security_context_linux.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/validate/security_context_linux.go b/pkg/validate/security_context_linux.go index 4681f8469e..e8a13ba89d 100644 --- a/pkg/validate/security_context_linux.go +++ b/pkg/validate/security_context_linux.go @@ -1545,14 +1545,14 @@ func createContainerWithExpectation(rc internalapi.RuntimeService, } // checkSetHostname checks if the hostname can be set in the container. -func checkSetHostname(rc internalapi.RuntimeService, containerID string, setable bool) { +func checkSetHostname(rc internalapi.RuntimeService, containerID string, settable bool) { By("set hostname in container to determine whether sethostname is blocked") cmd := []string{"hostname", "ANewHostName"} stdout, stderr, err := rc.ExecSync(context.TODO(), containerID, cmd, time.Duration(defaultExecSyncTimeout)*time.Second) msg := fmt.Sprintf("cmd %v, stdout %q, stderr %q", cmd, stdout, stderr) - if setable { + if settable { Expect(err).NotTo(HaveOccurred(), msg) } else { Expect(err).To(HaveOccurred(), msg)