ci: non-constant format string (govet)

Signed-off-by: Praveen M <m.praveen@ibm.com>
This commit is contained in:
Praveen M
2024-12-20 18:23:59 +05:30
committed by mergify[bot]
parent 96408c01c8
commit 54a8b50957
14 changed files with 63 additions and 57 deletions

View File

@ -279,7 +279,7 @@ var _ = Describe("nfs", func() {
err = createSubvolumegroup(f, fileSystemName, subvolumegroup)
if err != nil {
framework.Failf("%v", err)
framework.Failf("failed to create subvolumegroup %s: %v", subvolumegroup, err)
}
})
@ -320,7 +320,7 @@ var _ = Describe("nfs", func() {
}
err = deleteSubvolumegroup(f, fileSystemName, subvolumegroup)
if err != nil {
framework.Failf("%v", err)
framework.Failf("failed to delete subvolumegroup %s: %v", subvolumegroup, err)
}
if deployNFS {
@ -607,14 +607,15 @@ var _ = Describe("nfs", func() {
}
filePath := app.Spec.Containers[0].VolumeMounts[0].MountPath + "/test"
cmd := "echo 'Hello World' > " + filePath
_, stdErr := execCommandInPodAndAllowFail(
f,
"echo 'Hello World' > "+filePath,
cmd,
app.Namespace,
&opt)
readOnlyErr := fmt.Sprintf("cannot create %s: Read-only file system", filePath)
if !strings.Contains(stdErr, readOnlyErr) {
framework.Failf(stdErr)
framework.Failf("failed to execute command %s: %v", cmd, stdErr)
}
// delete PVC and app