Skip to content

Commit

Permalink
Merge pull request #1738 from feiskyer/fix-typo
Browse files Browse the repository at this point in the history
chore: fix typos lint error
  • Loading branch information
k8s-ci-robot authored Jan 3, 2025
2 parents ca9bf8d + dec4650 commit 8458a73
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/validate/security_context_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 8458a73

Please sign in to comment.