Skip to content

Commit 2e4f712

Browse files
author
Vipul Rawat
authored
remove mock_interfaces (#369)
1 parent 2a4b4e7 commit 2e4f712

File tree

2 files changed

+0
-292
lines changed

2 files changed

+0
-292
lines changed

pkg/gofr/datasource/pubsub/google/google_test.go

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -169,50 +169,3 @@ func Test_validateConfigs(t *testing.T) {
169169
assert.Equal(t, tc.expErr, err)
170170
}
171171
}
172-
173-
func TestGoogleClient_CreateTopicSuccess(t *testing.T) {
174-
ctrl := gomock.NewController(t)
175-
mock := NewMockClient(ctrl)
176-
177-
client := googleClient{
178-
client: mock,
179-
}
180-
181-
mock.EXPECT().CreateTopic(context.Background(), "test-topic").Return(&gcPubSub.Topic{}, nil)
182-
183-
err := client.CreateTopic(context.Background(), "test-topic")
184-
185-
assert.Nil(t, err)
186-
}
187-
188-
func TestGoogleClient_CreateTopic_AlreadyExist(t *testing.T) {
189-
ctrl := gomock.NewController(t)
190-
mock := NewMockClient(ctrl)
191-
192-
client := googleClient{
193-
client: mock,
194-
}
195-
196-
mock.EXPECT().CreateTopic(context.Background(), "test-topic").Return(&gcPubSub.Topic{},
197-
testutil.CustomError{ErrorMessage: "Topic already exists"})
198-
199-
err := client.CreateTopic(context.Background(), "test-topic")
200-
201-
assert.Nil(t, err)
202-
}
203-
204-
func TestGoogleClient_CreateTopicFailure(t *testing.T) {
205-
ctrl := gomock.NewController(t)
206-
mock := NewMockClient(ctrl)
207-
208-
client := googleClient{
209-
client: mock,
210-
}
211-
212-
mock.EXPECT().CreateTopic(context.Background(), "test-topic").Return(&gcPubSub.Topic{},
213-
testutil.CustomError{ErrorMessage: "Unknown Error"})
214-
215-
err := client.CreateTopic(context.Background(), "test-topic")
216-
217-
assert.NotNil(t, err)
218-
}

pkg/gofr/datasource/pubsub/google/mock_interfaces.go

Lines changed: 0 additions & 245 deletions
This file was deleted.

0 commit comments

Comments
 (0)