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

Commit

Permalink
Fixed Force() in tests using fake Config
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshVanL committed Jul 31, 2018
1 parent 8da9e77 commit 6d96c4c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/tarmak/cluster/cluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions pkg/tarmak/tarmak_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 6d96c4c

Please sign in to comment.