From 6d96c4c8aef4f8d664528f5b3b5206243bd7bc66 Mon Sep 17 00:00:00 2001 From: JoshVanL Date: Mon, 9 Jul 2018 15:34:51 +0100 Subject: [PATCH] Fixed Force() in tests using fake Config --- pkg/tarmak/cluster/cluster_test.go | 2 ++ pkg/tarmak/tarmak_test.go | 1 + 2 files changed, 3 insertions(+) diff --git a/pkg/tarmak/cluster/cluster_test.go b/pkg/tarmak/cluster/cluster_test.go index 1ec5910433..c17e081dd7 100644 --- a/pkg/tarmak/cluster/cluster_test.go +++ b/pkg/tarmak/cluster/cluster_test.go @@ -60,6 +60,8 @@ func newFakeCluster(t *testing.T, cluster *clusterv1alpha1.Cluster) *fakeCluster c.fakeProvider.EXPECT().Cloud().Return("provider").AnyTimes() c.fakeProvider.EXPECT().Name().Return("provider-name").AnyTimes() + c.fakeConfig.EXPECT().Force().Return(false).AnyTimes() + c.fakeTarmak.EXPECT().Config().AnyTimes().Return(c.fakeConfig) return c diff --git a/pkg/tarmak/tarmak_test.go b/pkg/tarmak/tarmak_test.go index 8c4ba2a5db..382d2d140b 100644 --- a/pkg/tarmak/tarmak_test.go +++ b/pkg/tarmak/tarmak_test.go @@ -64,6 +64,7 @@ func (tt *testTarmak) fakeAWSProvider(name string) { } tt.fakeConfig.EXPECT().Provider(name).AnyTimes().Return(&tarmakv1alpha1.Provider{}, nil) + tt.fakeConfig.EXPECT().Force().Return(false).AnyTimes() } func (tt *testTarmak) addEnvironment(env *tarmakv1alpha1.Environment) {