From d580f392794e8359a352f81b8bd3ef526be6c912 Mon Sep 17 00:00:00 2001 From: Jason Hall Date: Thu, 21 Mar 2019 15:59:33 -0400 Subject: [PATCH] fix unit tests --- pkg/build/gobuild_test.go | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/pkg/build/gobuild_test.go b/pkg/build/gobuild_test.go index d72b58c0..10ca7a99 100644 --- a/pkg/build/gobuild_test.go +++ b/pkg/build/gobuild_test.go @@ -40,9 +40,8 @@ func TestGoBuildIsSupportedRef(t *testing.T) { // Supported import paths. for _, importpath := range []string{ - filepath.FromSlash("github.com/google/go-containerregistry/cmd/crane"), - filepath.FromSlash("github.com/google/go-containerregistry/vendor/k8s.io/code-generator/cmd/deepcopy-gen"), // vendored commands work too. - filepath.FromSlash("github.com/google/ko/cmd"), + filepath.FromSlash("github.com/google/ko/cmd/ko"), + filepath.FromSlash("github.com/google/ko/vendor/github.com/googleapis/gnostic/compiler"), // vendored commands work too. } { t.Run(importpath, func(t *testing.T) { if !ng.IsSupportedReference(importpath) { @@ -53,8 +52,8 @@ func TestGoBuildIsSupportedRef(t *testing.T) { // Unsupported import paths. for _, importpath := range []string{ - filepath.FromSlash("github.com/google/go-containerregistry/v1/remote"), // not a command. - filepath.FromSlash("github.com/google/go-containerregistry/pkg/foo"), // does not exist. + filepath.FromSlash("github.com/google/ko/pkg/build"), // not a command. + filepath.FromSlash("github.com/google/ko/pkg/nonexistent"), // does not exist. } { t.Run(importpath, func(t *testing.T) { if ng.IsSupportedReference(importpath) { @@ -88,7 +87,7 @@ func TestGoBuildNoKoData(t *testing.T) { if err != nil { t.Fatalf("random.Image() = %v", err) } - importpath := "github.com/google/go-containerregistry" + importpath := "github.com/google/ko" creationTime := v1.Time{time.Unix(5000, 0)} ng, err := NewGo( @@ -165,7 +164,7 @@ func TestGoBuild(t *testing.T) { if err != nil { t.Fatalf("random.Image() = %v", err) } - importpath := "github.com/google/go-containerregistry" + importpath := "github.com/google/ko" creationTime := v1.Time{time.Unix(5000, 0)} ng, err := NewGo(