@@ -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- }
0 commit comments