@@ -144,32 +144,32 @@ func TestAppAddCommand(t *testing.T) {
144144 appSelectMock .On ("TeamAppSelectPrompt" ).Return (prompts.SelectedApp {Auth : mockAuthTeam1 }, nil )
145145
146146 // Mock valid session for team1
147- cm .APIInterface .On ("ValidateSession" , mock .Anything , mock .Anything ).Return (api.AuthSession {
147+ cm .API .On ("ValidateSession" , mock .Anything , mock .Anything ).Return (api.AuthSession {
148148 UserID : & mockAuthTeam1 .UserID ,
149149 TeamID : & mockAuthTeam1 .TeamID ,
150150 TeamName : & mockAuthTeam1 .TeamDomain ,
151151 }, nil )
152152
153153 // Mock a clean ValidateAppManifest result
154- cm .APIInterface .On ("ValidateAppManifest" , mock .Anything , mockAuthTeam1 .Token , mock .Anything , mock .Anything ).Return (
154+ cm .API .On ("ValidateAppManifest" , mock .Anything , mockAuthTeam1 .Token , mock .Anything , mock .Anything ).Return (
155155 api.ValidateAppManifestResult {
156156 Warnings : slackerror.Warnings {},
157157 }, nil ,
158158 )
159159
160160 // Mock Host
161- cm .APIInterface .On ("Host" ).Return ("" )
161+ cm .API .On ("Host" ).Return ("" )
162162
163163 // Mock a successful CreateApp call and return our mocked AppID
164- cm .APIInterface .On ("CreateApp" , mock .Anything , mockAuthTeam1 .Token , mock .Anything , mock .Anything ).Return (
164+ cm .API .On ("CreateApp" , mock .Anything , mockAuthTeam1 .Token , mock .Anything , mock .Anything ).Return (
165165 api.CreateAppResult {
166166 AppID : mockAppTeam1 .AppID ,
167167 },
168168 nil ,
169169 )
170170
171171 // Mock a successful DeveloperAppInstall
172- cm .APIInterface .On ("DeveloperAppInstall" , mock .Anything , mock .Anything , mockAuthTeam1 .Token , mock .Anything , mock .Anything , mock .Anything , mock .Anything , mock .Anything ).Return (
172+ cm .API .On ("DeveloperAppInstall" , mock .Anything , mock .Anything , mockAuthTeam1 .Token , mock .Anything , mock .Anything , mock .Anything , mock .Anything , mock .Anything ).Return (
173173 api.DeveloperAppInstallResult {
174174 AppID : mockAppTeam1 .AppID ,
175175 APIAccessTokens : struct {
@@ -183,7 +183,7 @@ func TestAppAddCommand(t *testing.T) {
183183 )
184184
185185 // Mock existing and updated cache
186- cm .APIInterface .On (
186+ cm .API .On (
187187 "ExportAppManifest" ,
188188 mock .Anything ,
189189 mock .Anything ,
@@ -216,21 +216,21 @@ func TestAppAddCommand(t *testing.T) {
216216 appSelectMock .On ("TeamAppSelectPrompt" ).Return (prompts.SelectedApp {App : mockAppTeam1 , Auth : mockAuthTeam1 }, nil )
217217
218218 // Mock valid session for team1
219- cm .APIInterface .On ("ValidateSession" , mock .Anything , mock .Anything ).Return (api.AuthSession {
219+ cm .API .On ("ValidateSession" , mock .Anything , mock .Anything ).Return (api.AuthSession {
220220 UserID : & mockAuthTeam1 .UserID ,
221221 TeamID : & mockAuthTeam1 .TeamID ,
222222 TeamName : & mockAuthTeam1 .TeamDomain ,
223223 }, nil )
224224
225225 // Mock a clean ValidateAppManifest result
226- cm .APIInterface .On ("ValidateAppManifest" , mock .Anything , mockAuthTeam1 .Token , mock .Anything , mock .Anything ).Return (
226+ cm .API .On ("ValidateAppManifest" , mock .Anything , mockAuthTeam1 .Token , mock .Anything , mock .Anything ).Return (
227227 api.ValidateAppManifestResult {
228228 Warnings : slackerror.Warnings {},
229229 }, nil ,
230230 )
231231
232232 // Mock Host
233- cm .APIInterface .On ("Host" ).Return ("" )
233+ cm .API .On ("Host" ).Return ("" )
234234
235235 // Mock to ensure that an existing deployed app is found
236236 appClientMock := & app.AppClientMock {}
@@ -241,7 +241,7 @@ func TestAppAddCommand(t *testing.T) {
241241 cf .AppClient ().AppClientInterface = appClientMock
242242
243243 // Mock to ensure that the existing deployed app is updated successfully
244- cm .APIInterface .On ("UpdateApp" , mock .Anything , mockAuthTeam1 .Token , mock .Anything , mock .Anything , mock .Anything , mock .Anything ).Return (
244+ cm .API .On ("UpdateApp" , mock .Anything , mockAuthTeam1 .Token , mock .Anything , mock .Anything , mock .Anything , mock .Anything ).Return (
245245 api.UpdateAppResult {
246246 AppID : mockAppTeam1 .AppID ,
247247 Credentials : api.Credentials {},
@@ -251,7 +251,7 @@ func TestAppAddCommand(t *testing.T) {
251251 )
252252
253253 // Mock a successful DeveloperAppInstall
254- cm .APIInterface .On ("DeveloperAppInstall" , mock .Anything , mock .Anything , mockAuthTeam1 .Token , mock .Anything , mock .Anything , mock .Anything , mock .Anything , mock .Anything ).Return (
254+ cm .API .On ("DeveloperAppInstall" , mock .Anything , mock .Anything , mockAuthTeam1 .Token , mock .Anything , mock .Anything , mock .Anything , mock .Anything , mock .Anything ).Return (
255255 api.DeveloperAppInstallResult {
256256 AppID : mockAppTeam1 .AppID ,
257257 APIAccessTokens : struct {
@@ -265,7 +265,7 @@ func TestAppAddCommand(t *testing.T) {
265265 )
266266
267267 // Mock existing and updated cache
268- cm .APIInterface .On (
268+ cm .API .On (
269269 "ExportAppManifest" ,
270270 mock .Anything ,
271271 mock .Anything ,
@@ -306,24 +306,24 @@ func TestAppAddCommand(t *testing.T) {
306306 teamAppSelectPromptFunc = appSelectMock .TeamAppSelectPrompt
307307 appSelectMock .On ("TeamAppSelectPrompt" ).Return (prompts.SelectedApp {App : types .NewApp (), Auth : mockOrgAuth }, nil )
308308 // Mock calls
309- cm .APIInterface .On ("ValidateSession" , mock .Anything , mock .Anything ).Return (api.AuthSession {
309+ cm .API .On ("ValidateSession" , mock .Anything , mock .Anything ).Return (api.AuthSession {
310310 UserID : & mockOrgAuth .UserID ,
311311 TeamID : & mockOrgAuth .TeamID ,
312312 TeamName : & mockOrgAuth .TeamDomain ,
313313 }, nil )
314- cm .APIInterface .On ("ValidateAppManifest" , mock .Anything , mockOrgAuth .Token , mock .Anything , mock .Anything ).Return (
314+ cm .API .On ("ValidateAppManifest" , mock .Anything , mockOrgAuth .Token , mock .Anything , mock .Anything ).Return (
315315 api.ValidateAppManifestResult {}, nil ,
316316 )
317- cm .APIInterface .On ("Host" ).Return ("" )
317+ cm .API .On ("Host" ).Return ("" )
318318 // Return mocked AppID
319- cm .APIInterface .On ("CreateApp" , mock .Anything , mockOrgAuth .Token , mock .Anything , mock .Anything ).Return (
319+ cm .API .On ("CreateApp" , mock .Anything , mockOrgAuth .Token , mock .Anything , mock .Anything ).Return (
320320 api.CreateAppResult {
321321 AppID : mockOrgApp .AppID ,
322322 },
323323 nil ,
324324 )
325325 // Mock call to apps.developerInstall
326- cm .APIInterface .On ("DeveloperAppInstall" , mock .Anything , mock .Anything , mockOrgAuth .Token , mock .Anything , mock .Anything , mock .Anything , mock .Anything , mock .Anything ).Return (
326+ cm .API .On ("DeveloperAppInstall" , mock .Anything , mock .Anything , mockOrgAuth .Token , mock .Anything , mock .Anything , mock .Anything , mock .Anything , mock .Anything ).Return (
327327 api.DeveloperAppInstallResult {
328328 AppID : mockOrgApp .AppID ,
329329 },
@@ -332,7 +332,7 @@ func TestAppAddCommand(t *testing.T) {
332332 )
333333
334334 // Mock existing and updated cache
335- cm .APIInterface .On (
335+ cm .API .On (
336336 "ExportAppManifest" ,
337337 mock .Anything ,
338338 mock .Anything ,
@@ -353,7 +353,7 @@ func TestAppAddCommand(t *testing.T) {
353353 cm .Config .ProjectConfig = mockProjectConfig
354354 },
355355 ExpectedAsserts : func (t * testing.T , ctx context.Context , cm * shared.ClientsMock ) {
356- cm .APIInterface .AssertCalled (t , "DeveloperAppInstall" , mock .Anything , mock .Anything , mockOrgAuth .Token , mock .Anything , mock .Anything , mock .Anything , "T123" , mock .Anything )
356+ cm .API .AssertCalled (t , "DeveloperAppInstall" , mock .Anything , mock .Anything , mockOrgAuth .Token , mock .Anything , mock .Anything , mock .Anything , "T123" , mock .Anything )
357357 },
358358 },
359359 "When admin approval request is pending, outputs instructions" : {
@@ -366,32 +366,32 @@ func TestAppAddCommand(t *testing.T) {
366366 teamAppSelectPromptFunc = appSelectMock .TeamAppSelectPrompt
367367 appSelectMock .On ("TeamAppSelectPrompt" ).Return (prompts.SelectedApp {App : types .NewApp (), Auth : mockOrgAuth }, nil )
368368 // Mock calls
369- cm .APIInterface .On ("ValidateSession" , mock .Anything , mock .Anything ).Return (api.AuthSession {
369+ cm .API .On ("ValidateSession" , mock .Anything , mock .Anything ).Return (api.AuthSession {
370370 UserID : & mockOrgAuth .UserID ,
371371 TeamID : & mockOrgAuth .TeamID ,
372372 TeamName : & mockOrgAuth .TeamDomain ,
373373 }, nil )
374- cm .APIInterface .On ("ValidateAppManifest" , mock .Anything , mockOrgAuth .Token , mock .Anything , mock .Anything ).Return (
374+ cm .API .On ("ValidateAppManifest" , mock .Anything , mockOrgAuth .Token , mock .Anything , mock .Anything ).Return (
375375 api.ValidateAppManifestResult {}, nil ,
376376 )
377- cm .APIInterface .On ("Host" ).Return ("" )
377+ cm .API .On ("Host" ).Return ("" )
378378 // Return mocked AppID
379- cm .APIInterface .On ("CreateApp" , mock .Anything , mockOrgAuth .Token , mock .Anything , mock .Anything ).Return (
379+ cm .API .On ("CreateApp" , mock .Anything , mockOrgAuth .Token , mock .Anything , mock .Anything ).Return (
380380 api.CreateAppResult {
381381 AppID : mockOrgApp .AppID ,
382382 },
383383 nil ,
384384 )
385385 // Mock call to apps.developerInstall
386- cm .APIInterface .On ("DeveloperAppInstall" , mock .Anything , mock .Anything , mockOrgAuth .Token , mock .Anything , mock .Anything , mock .Anything , mock .Anything , mock .Anything ).Return (
386+ cm .API .On ("DeveloperAppInstall" , mock .Anything , mock .Anything , mockOrgAuth .Token , mock .Anything , mock .Anything , mock .Anything , mock .Anything , mock .Anything ).Return (
387387 api.DeveloperAppInstallResult {
388388 AppID : mockOrgApp .AppID ,
389389 },
390390 types .InstallRequestPending ,
391391 nil ,
392392 )
393393 // Mock existing and updated cache
394- cm .APIInterface .On (
394+ cm .API .On (
395395 "ExportAppManifest" ,
396396 mock .Anything ,
397397 mock .Anything ,
@@ -422,32 +422,32 @@ func TestAppAddCommand(t *testing.T) {
422422 teamAppSelectPromptFunc = appSelectMock .TeamAppSelectPrompt
423423 appSelectMock .On ("TeamAppSelectPrompt" ).Return (prompts.SelectedApp {App : types .NewApp (), Auth : mockOrgAuth }, nil )
424424 // Mock calls
425- cm .APIInterface .On ("ValidateSession" , mock .Anything , mock .Anything ).Return (api.AuthSession {
425+ cm .API .On ("ValidateSession" , mock .Anything , mock .Anything ).Return (api.AuthSession {
426426 UserID : & mockOrgAuth .UserID ,
427427 TeamID : & mockOrgAuth .TeamID ,
428428 TeamName : & mockOrgAuth .TeamDomain ,
429429 }, nil )
430- cm .APIInterface .On ("ValidateAppManifest" , mock .Anything , mockOrgAuth .Token , mock .Anything , mock .Anything ).Return (
430+ cm .API .On ("ValidateAppManifest" , mock .Anything , mockOrgAuth .Token , mock .Anything , mock .Anything ).Return (
431431 api.ValidateAppManifestResult {}, nil ,
432432 )
433- cm .APIInterface .On ("Host" ).Return ("" )
433+ cm .API .On ("Host" ).Return ("" )
434434 // Return mocked AppID
435- cm .APIInterface .On ("CreateApp" , mock .Anything , mockOrgAuth .Token , mock .Anything , mock .Anything ).Return (
435+ cm .API .On ("CreateApp" , mock .Anything , mockOrgAuth .Token , mock .Anything , mock .Anything ).Return (
436436 api.CreateAppResult {
437437 AppID : mockOrgApp .AppID ,
438438 },
439439 nil ,
440440 )
441441 // Mock call to apps.developerInstall
442- cm .APIInterface .On ("DeveloperAppInstall" , mock .Anything , mock .Anything , mockOrgAuth .Token , mock .Anything , mock .Anything , mock .Anything , mock .Anything , mock .Anything ).Return (
442+ cm .API .On ("DeveloperAppInstall" , mock .Anything , mock .Anything , mockOrgAuth .Token , mock .Anything , mock .Anything , mock .Anything , mock .Anything , mock .Anything ).Return (
443443 api.DeveloperAppInstallResult {
444444 AppID : mockOrgApp .AppID ,
445445 },
446446 types .InstallRequestCancelled ,
447447 nil ,
448448 )
449449 // Mock existing and updated cache
450- cm .APIInterface .On (
450+ cm .API .On (
451451 "ExportAppManifest" ,
452452 mock .Anything ,
453453 mock .Anything ,
0 commit comments