diff --git a/.travis.yml b/.travis.yml index 26659ef606..146aa9f313 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,7 +7,7 @@ script: - make dco - make fmt # - make lint -# - make vet +- make vet - make test-short - make test-long - make coverage-send diff --git a/Makefile.inc b/Makefile.inc index 39dd478e9b..3e92741e1e 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -35,5 +35,5 @@ endif default: build clean: coverage-clean build-clean build: build-simple -test: dco fmt test-short +test: dco fmt vet test-short validate: dco fmt vet lint test-short test-long \ No newline at end of file diff --git a/libmachine/provision/serviceaction/service_action_test.go b/libmachine/provision/serviceaction/service_action_test.go index 85cbdf1b29..b2072a5f04 100644 --- a/libmachine/provision/serviceaction/service_action_test.go +++ b/libmachine/provision/serviceaction/service_action_test.go @@ -4,6 +4,6 @@ import "testing" func TestActionValue(t *testing.T) { if Restart.String() != "restart" { - t.Fatal("Expected %q but got %q", "install", Restart.String()) + t.Fatalf("Expected %s but got %s", "install", Restart.String()) } } diff --git a/ssh/keys.go b/ssh/keys.go index 636a684b4b..bdadf7d085 100644 --- a/ssh/keys.go +++ b/ssh/keys.go @@ -62,7 +62,7 @@ func (kp *KeyPair) WriteToFile(privateKeyPath string, publicKeyPath string) erro }{ { File: privateKeyPath, - Value: pem.EncodeToMemory(&pem.Block{"RSA PRIVATE KEY", nil, kp.PrivateKey}), + Value: pem.EncodeToMemory(&pem.Block{Type: "RSA PRIVATE KEY", Headers: nil, Bytes: kp.PrivateKey}), }, { File: publicKeyPath, diff --git a/ssh/keys_test.go b/ssh/keys_test.go index 9812a58449..07e3b8321b 100644 --- a/ssh/keys_test.go +++ b/ssh/keys_test.go @@ -11,7 +11,7 @@ func TestNewKeyPair(t *testing.T) { t.Fatal(err) } - if privPem := pem.EncodeToMemory(&pem.Block{"RSA PRIVATE KEY", nil, pair.PrivateKey}); len(privPem) == 0 { + if privPem := pem.EncodeToMemory(&pem.Block{Type: "RSA PRIVATE KEY", Headers: nil, Bytes: pair.PrivateKey}); len(privPem) == 0 { t.Fatal("No PEM returned") } diff --git a/utils/b2d_test.go b/utils/b2d_test.go index 2fe5a38103..95997afee5 100644 --- a/utils/b2d_test.go +++ b/utils/b2d_test.go @@ -24,7 +24,7 @@ func TestGetLatestBoot2DockerReleaseUrl(t *testing.T) { expectedUrl := fmt.Sprintf("%s/boot2docker/boot2docker/releases/download/0.1/boot2docker.iso", ts.URL) if isoUrl != expectedUrl { - t.Fatalf("expected url %s; received %s", isoUrl) + t.Fatalf("expected url %s; received %s", isoUrl, expectedUrl) } } diff --git a/utils/utils_test.go b/utils/utils_test.go index 1b9f4c6cdb..4bcf411eeb 100644 --- a/utils/utils_test.go +++ b/utils/utils_test.go @@ -119,7 +119,7 @@ func TestCopyFile(t *testing.T) { } if string(data) != testStr { - t.Fatalf("expected data \"%s\"; received \"%\"", testStr, string(data)) + t.Fatalf("expected data \"%s\"; received \"%s\"", testStr, string(data)) } }