Skip to content

Commit

Permalink
kola: Fix format string errors
Browse files Browse the repository at this point in the history
These show up on go 1.21 when running ./test.

Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
  • Loading branch information
jepio committed Mar 26, 2024
1 parent afcf2a2 commit 012b3c1
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions kola/tests/bpf/local-gadget.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ func localGadgetTest(c cluster.TestCluster) {

tmpl, err := template.New("user-data").Parse(config)
if err != nil {
c.Fatalf("parsing user-data: %w", err)
c.Fatalf("parsing user-data: %v", err)
}

c.Run("dns gadget", func(c cluster.TestCluster) {
Expand All @@ -133,7 +133,7 @@ func localGadgetTest(c cluster.TestCluster) {

var buf bytes.Buffer
if err := tmpl.Execute(&buf, gadget); err != nil {
c.Fatalf("rendering user-data: %w", err)
c.Fatalf("rendering user-data: %v", err)
}

node, err := c.NewMachine(conf.ContainerLinuxConfig(buf.String()))
Expand Down
2 changes: 1 addition & 1 deletion kola/tests/ostree/basic.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ func ostreeRemoteTest(c cluster.TestCluster) {
osRemoteListSplit := strings.Split(string(osRemoteListOut), "\n")
// should have original remote + newly added remote
if len(osRemoteListSplit) != initialRemotesNum+1 {
c.Fatalf(`Did not find expected amount of ostree remotes: %q. Expected %d`, string(osRemoteListOut), osRemoteListSplit)
c.Fatalf(`Did not find expected amount of ostree remotes: %q. Expected %d`, string(osRemoteListOut), len(osRemoteListSplit))
}

var remoteFound bool = false
Expand Down
2 changes: 1 addition & 1 deletion kola/tests/ostree/unlock.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ func ostreeHotfixTest(c cluster.TestCluster) {
}

if rollbackStatus.Deployments[0].Unlocked != "none" {
c.Fatalf(`Rollback did not remove hotfix mode; got: $q`, rollbackStatus.Deployments[0].Unlocked)
c.Fatalf(`Rollback did not remove hotfix mode; got: %q`, rollbackStatus.Deployments[0].Unlocked)
}

_, secCmdErr := c.SSH(m, ("command -v " + rpmName))
Expand Down
2 changes: 1 addition & 1 deletion kola/tests/rpmostree/deployments.go
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ func rpmOstreeInstallUninstall(c cluster.TestCluster) {

// check the metadata to make sure everything went well
if len(postUninstallStatus.Deployments) != 2 {
c.Fatal("Expected %d deployments, got %d", 2, len(postUninstallStatus.Deployments))
c.Fatalf("Expected %d deployments, got %d", 2, len(postUninstallStatus.Deployments))
}

if postUninstallStatus.Deployments[0].Checksum != originalCsum {
Expand Down

0 comments on commit 012b3c1

Please sign in to comment.