From 1f238506a6a807329c24dab1fad9f80f7430e75a Mon Sep 17 00:00:00 2001 From: David Gageot Date: Tue, 11 Dec 2018 10:47:53 +0100 Subject: [PATCH] Add missing fake k8s context Signed-off-by: David Gageot --- pkg/skaffold/runner/runner_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/skaffold/runner/runner_test.go b/pkg/skaffold/runner/runner_test.go index f06e4ee6152..a19095d17ba 100644 --- a/pkg/skaffold/runner/runner_test.go +++ b/pkg/skaffold/runner/runner_test.go @@ -33,6 +33,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/watch" "github.com/GoogleContainerTools/skaffold/testutil" "github.com/pkg/errors" + "k8s.io/client-go/tools/clientcmd/api" ) type TestBuilder struct { @@ -164,6 +165,9 @@ func createDefaultRunner(t *testing.T) *SkaffoldRunner { } func TestNewForConfig(t *testing.T) { + restore := testutil.SetupFakeKubernetesContext(t, api.Config{CurrentContext: "cluster1"}) + defer restore() + var tests = []struct { description string pipeline *latest.SkaffoldPipeline