@@ -61,7 +61,7 @@ func Test_Apps_Link(t *testing.T) {
6161 mockLinkSlackAuth1 ,
6262 }, nil )
6363 cm .AddDefaultMocks ()
64- setupAppLinkCommandMocks (t , cm , cf )
64+ setupAppLinkCommandMocks (t , ctx , cm , cf )
6565 cm .IO .On ("SelectPrompt" ,
6666 mock .Anything ,
6767 "Select the existing app team" ,
@@ -118,7 +118,7 @@ func Test_Apps_Link(t *testing.T) {
118118 mockLinkSlackAuth1 ,
119119 }, nil )
120120 cm .AddDefaultMocks ()
121- setupAppLinkCommandMocks (t , cm , cf )
121+ setupAppLinkCommandMocks (t , ctx , cm , cf )
122122 cm .IO .On ("SelectPrompt" ,
123123 mock .Anything ,
124124 "Select the existing app team" ,
@@ -177,7 +177,7 @@ func Test_Apps_Link(t *testing.T) {
177177 mockLinkSlackAuth2 ,
178178 }, nil )
179179 cm .AddDefaultMocks ()
180- setupAppLinkCommandMocks (t , cm , cf )
180+ setupAppLinkCommandMocks (t , ctx , cm , cf )
181181 existingApp := types.App {
182182 AppID : mockLinkAppID1 ,
183183 TeamDomain : mockLinkSlackAuth1 .TeamDomain ,
@@ -246,7 +246,7 @@ func Test_Apps_Link(t *testing.T) {
246246 mockLinkSlackAuth2 ,
247247 }, nil )
248248 cm .AddDefaultMocks ()
249- setupAppLinkCommandMocks (t , cm , cf )
249+ setupAppLinkCommandMocks (t , ctx , cm , cf )
250250 existingApp := types.App {
251251 AppID : mockLinkAppID1 ,
252252 TeamDomain : mockLinkSlackAuth1 .TeamDomain ,
@@ -321,7 +321,7 @@ func Test_Apps_Link(t *testing.T) {
321321 mockLinkSlackAuth2 ,
322322 }, nil )
323323 cm .AddDefaultMocks ()
324- setupAppLinkCommandMocks (t , cm , cf )
324+ setupAppLinkCommandMocks (t , ctx , cm , cf )
325325 existingApp := types.App {
326326 AppID : mockLinkAppID2 ,
327327 TeamDomain : mockLinkSlackAuth2 .TeamDomain ,
@@ -389,7 +389,7 @@ func Test_Apps_Link(t *testing.T) {
389389 mockLinkSlackAuth2 ,
390390 }, nil )
391391 cm .AddDefaultMocks ()
392- setupAppLinkCommandMocks (t , cm , cf )
392+ setupAppLinkCommandMocks (t , ctx , cm , cf )
393393 cm .IO .On ("SelectPrompt" ,
394394 mock .Anything ,
395395 "Select the existing app team" ,
@@ -437,9 +437,9 @@ func Test_Apps_Link(t *testing.T) {
437437 mockLinkSlackAuth1 ,
438438 }, nil )
439439 cm .AddDefaultMocks ()
440- setupAppLinkCommandMocks (t , cm , cf )
440+ setupAppLinkCommandMocks (t , ctx , cm , cf )
441441 // Set manifest source to project to trigger confirmation prompt
442- if err := cm .Config .ProjectConfig .SetManifestSource (t . Context () , config .MANIFEST_SOURCE_LOCAL ); err != nil {
442+ if err := cm .Config .ProjectConfig .SetManifestSource (ctx , config .MANIFEST_SOURCE_LOCAL ); err != nil {
443443 require .FailNow (t , fmt .Sprintf ("Failed to set the manifest source in the memory-based file system: %s" , err ))
444444 }
445445 // Accept manifest source confirmation prompt
@@ -506,9 +506,9 @@ func Test_Apps_Link(t *testing.T) {
506506 "decline manifest source prompt should not link app" : {
507507 Setup : func (t * testing.T , ctx context.Context , cm * shared.ClientsMock , cf * shared.ClientFactory ) {
508508 cm .AddDefaultMocks ()
509- setupAppLinkCommandMocks (t , cm , cf )
509+ setupAppLinkCommandMocks (t , ctx , cm , cf )
510510 // Set manifest source to project to trigger confirmation prompt
511- if err := cm .Config .ProjectConfig .SetManifestSource (t . Context () , config .MANIFEST_SOURCE_LOCAL ); err != nil {
511+ if err := cm .Config .ProjectConfig .SetManifestSource (ctx , config .MANIFEST_SOURCE_LOCAL ); err != nil {
512512 require .FailNow (t , fmt .Sprintf ("Failed to set the manifest source in the memory-based file system: %s" , err ))
513513 }
514514 // Decline manifest source confirmation prompt
@@ -593,8 +593,7 @@ func Test_Apps_LinkAppHeaderSection(t *testing.T) {
593593 }
594594}
595595
596- func setupAppLinkCommandMocks (t * testing.T , cm * shared.ClientsMock , cf * shared.ClientFactory ) {
597- ctx := t .Context ()
596+ func setupAppLinkCommandMocks (t * testing.T , ctx context.Context , cm * shared.ClientsMock , cf * shared.ClientFactory ) {
598597 projectDirPath := slackdeps .MockWorkingDirectory
599598 cm .Os .On ("Getwd" ).Return (projectDirPath , nil )
600599
0 commit comments