Skip to content
This repository was archived by the owner on Jan 9, 2023. It is now read-only.

Commit 30930b6

Browse files
committed
Fixed Force() in tests using fake Config
1 parent 4c70a54 commit 30930b6

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

pkg/tarmak/cluster/cluster_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ func newFakeCluster(t *testing.T, cluster *clusterv1alpha1.Cluster) *fakeCluster
6060
c.fakeProvider.EXPECT().Cloud().Return("provider").AnyTimes()
6161
c.fakeProvider.EXPECT().Name().Return("provider-name").AnyTimes()
6262

63+
c.fakeConfig.EXPECT().Force().Return(false).AnyTimes()
64+
6365
c.fakeTarmak.EXPECT().Config().AnyTimes().Return(c.fakeConfig)
6466

6567
return c

pkg/tarmak/tarmak_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ func (tt *testTarmak) fakeAWSProvider(name string) {
6464
}
6565

6666
tt.fakeConfig.EXPECT().Provider(name).AnyTimes().Return(&tarmakv1alpha1.Provider{}, nil)
67+
tt.fakeConfig.EXPECT().Force().Return(false).AnyTimes()
6768
}
6869

6970
func (tt *testTarmak) addEnvironment(env *tarmakv1alpha1.Environment) {

0 commit comments

Comments
 (0)