@@ -76,12 +76,12 @@ func TestAppAddCommandPreRun(t *testing.T) {
7676 testutil .TableTestCommand (t , testutil.CommandTests {
7777 "errors if not run in a project directory" : {
7878 ExpectedError : slackerror .New (slackerror .ErrInvalidAppDirectory ),
79- Setup : func (t * testing.T , cm * shared.ClientsMock , cf * shared.ClientFactory ) {
79+ Setup : func (t * testing.T , ctx context. Context , cm * shared.ClientsMock , cf * shared.ClientFactory ) {
8080 },
8181 },
8282 "proceeds if run in a project directory" : {
8383 ExpectedError : nil ,
84- Setup : func (t * testing.T , cm * shared.ClientsMock , cf * shared.ClientFactory ) {
84+ Setup : func (t * testing.T , ctx context. Context , cm * shared.ClientsMock , cf * shared.ClientFactory ) {
8585 cf .SDKConfig .WorkingDirectory = "."
8686 },
8787 },
@@ -100,8 +100,7 @@ func TestAppAddCommandPreRun(t *testing.T) {
100100 Message : "Cannot install apps with manifests sourced from app settings" ,
101101 },
102102 }),
103- Setup : func (t * testing.T , cm * shared.ClientsMock , cf * shared.ClientFactory ) {
104- ctx := context .Background ()
103+ Setup : func (t * testing.T , ctx context.Context , cm * shared.ClientsMock , cf * shared.ClientFactory ) {
105104 cf .SDKConfig .WorkingDirectory = "."
106105 cm .AddDefaultMocks ()
107106 cm .Config .ExperimentsFlag = append (cm .Config .ExperimentsFlag , experiment .BoltFrameworks )
@@ -113,8 +112,7 @@ func TestAppAddCommandPreRun(t *testing.T) {
113112 },
114113 "proceeds if manifest.source is local with the bolt experiment" : {
115114 ExpectedError : nil ,
116- Setup : func (t * testing.T , cm * shared.ClientsMock , cf * shared.ClientFactory ) {
117- ctx := context .Background ()
115+ Setup : func (t * testing.T , ctx context.Context , cm * shared.ClientsMock , cf * shared.ClientFactory ) {
118116 cf .SDKConfig .WorkingDirectory = "."
119117 cm .AddDefaultMocks ()
120118 cm .Config .ExperimentsFlag = append (cm .Config .ExperimentsFlag , experiment .BoltFrameworks )
@@ -137,7 +135,7 @@ func TestAppAddCommand(t *testing.T) {
137135 "adds a new deployed app" : {
138136 CmdArgs : []string {},
139137 ExpectedOutputs : []string {"Creating app manifest" , "Installing" },
140- Setup : func (t * testing.T , cm * shared.ClientsMock , cf * shared.ClientFactory ) {
138+ Setup : func (t * testing.T , ctx context. Context , cm * shared.ClientsMock , cf * shared.ClientFactory ) {
141139 prepareAddMocks (t , cf , cm )
142140
143141 // Mock TeamSelector prompt to return "team1"
@@ -209,7 +207,7 @@ func TestAppAddCommand(t *testing.T) {
209207 "updates an existing deployed app" : {
210208 CmdArgs : []string {},
211209 ExpectedOutputs : []string {"Updated app manifest" },
212- Setup : func (t * testing.T , cm * shared.ClientsMock , cf * shared.ClientFactory ) {
210+ Setup : func (t * testing.T , ctx context. Context , cm * shared.ClientsMock , cf * shared.ClientFactory ) {
213211 prepareAddMocks (t , cf , cm )
214212
215213 // Mock TeamSelector prompt to return "team1"
@@ -291,7 +289,7 @@ func TestAppAddCommand(t *testing.T) {
291289 "errors if authentication for the team is missing" : {
292290 CmdArgs : []string {},
293291 ExpectedError : slackerror .New (slackerror .ErrCredentialsNotFound ),
294- Setup : func (t * testing.T , cm * shared.ClientsMock , cf * shared.ClientFactory ) {
292+ Setup : func (t * testing.T , ctx context. Context , cm * shared.ClientsMock , cf * shared.ClientFactory ) {
295293 prepareAddMocks (t , cf , cm )
296294 appSelectMock := prompts .NewAppSelectMock ()
297295 teamAppSelectPromptFunc = appSelectMock .TeamAppSelectPrompt
@@ -301,7 +299,7 @@ func TestAppAddCommand(t *testing.T) {
301299 "adds a new deployed app to an org with a workspace grant" : {
302300 CmdArgs : []string {"--" + cmdutil .OrgGrantWorkspaceFlag , "T123" },
303301 ExpectedOutputs : []string {"Creating app manifest" , "Installing" },
304- Setup : func (t * testing.T , cm * shared.ClientsMock , cf * shared.ClientFactory ) {
302+ Setup : func (t * testing.T , ctx context. Context , cm * shared.ClientsMock , cf * shared.ClientFactory ) {
305303 prepareAddMocks (t , cf , cm )
306304 // Select workspace
307305 appSelectMock := prompts .NewAppSelectMock ()
@@ -361,7 +359,7 @@ func TestAppAddCommand(t *testing.T) {
361359 "When admin approval request is pending, outputs instructions" : {
362360 CmdArgs : []string {"--" + cmdutil .OrgGrantWorkspaceFlag , "T123" },
363361 ExpectedOutputs : []string {"Creating app manifest" , "Installing" , "Your request to install the app is pending" , "complete installation by re-running" },
364- Setup : func (t * testing.T , cm * shared.ClientsMock , cf * shared.ClientFactory ) {
362+ Setup : func (t * testing.T , ctx context. Context , cm * shared.ClientsMock , cf * shared.ClientFactory ) {
365363 prepareAddMocks (t , cf , cm )
366364 // Select workspace
367365 appSelectMock := prompts .NewAppSelectMock ()
@@ -417,7 +415,7 @@ func TestAppAddCommand(t *testing.T) {
417415 "When admin approval request is cancelled, outputs instructions" : {
418416 CmdArgs : []string {"--" + cmdutil .OrgGrantWorkspaceFlag , "T123" },
419417 ExpectedOutputs : []string {"Creating app manifest" , "Installing" , "Your request to install the app has been cancelled" },
420- Setup : func (t * testing.T , cm * shared.ClientsMock , cf * shared.ClientFactory ) {
418+ Setup : func (t * testing.T , ctx context. Context , cm * shared.ClientsMock , cf * shared.ClientFactory ) {
421419 prepareAddMocks (t , cf , cm )
422420 // Select workspace
423421 appSelectMock := prompts .NewAppSelectMock ()
0 commit comments