From 413b84af6b4ca20f4fd128ee2730acdab8f09c19 Mon Sep 17 00:00:00 2001 From: Emil Hessman Date: Mon, 15 Dec 2014 18:54:51 +0100 Subject: [PATCH] builder/digitalocean: fix incorrect printf verb types Fixes the following vet reports: builder/digitalocean/builder_test.go:267: arg b.config.SSHUsername for printf verb %d of wrong type: string builder/digitalocean/builder_test.go:300: arg b.config.RawSSHTimeout for printf verb %d of wrong type: string builder/digitalocean/builder_test.go:341: arg b.config.RawStateTimeout for printf verb %d of wrong type: string builder/digitalocean/builder_test.go:382: arg b.config.PrivateNetworking for printf verb %s of wrong type: bool builder/digitalocean/builder_test.go:397: arg b.config.PrivateNetworking for printf verb %s of wrong type: bool --- builder/digitalocean/builder_test.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/builder/digitalocean/builder_test.go b/builder/digitalocean/builder_test.go index d6857bbe6..bd3bb1d21 100644 --- a/builder/digitalocean/builder_test.go +++ b/builder/digitalocean/builder_test.go @@ -264,7 +264,7 @@ func TestBuilderPrepare_SSHUsername(t *testing.T) { } if b.config.SSHUsername != "root" { - t.Errorf("invalid: %d", b.config.SSHUsername) + t.Errorf("invalid: %s", b.config.SSHUsername) } // Test set @@ -297,7 +297,7 @@ func TestBuilderPrepare_SSHTimeout(t *testing.T) { } if b.config.RawSSHTimeout != "1m" { - t.Errorf("invalid: %d", b.config.RawSSHTimeout) + t.Errorf("invalid: %s", b.config.RawSSHTimeout) } // Test set @@ -338,7 +338,7 @@ func TestBuilderPrepare_StateTimeout(t *testing.T) { } if b.config.RawStateTimeout != "6m" { - t.Errorf("invalid: %d", b.config.RawStateTimeout) + t.Errorf("invalid: %s", b.config.RawStateTimeout) } // Test set @@ -379,7 +379,7 @@ func TestBuilderPrepare_PrivateNetworking(t *testing.T) { } if b.config.PrivateNetworking != false { - t.Errorf("invalid: %s", b.config.PrivateNetworking) + t.Errorf("invalid: %t", b.config.PrivateNetworking) } // Test set @@ -394,7 +394,7 @@ func TestBuilderPrepare_PrivateNetworking(t *testing.T) { } if b.config.PrivateNetworking != true { - t.Errorf("invalid: %s", b.config.PrivateNetworking) + t.Errorf("invalid: %t", b.config.PrivateNetworking) } }