@@ -340,37 +340,6 @@ func pollStackDeployments(t *testing.T, ctx context.Context, client *Client, sta
340
340
return
341
341
}
342
342
343
- func pollStackDeploymentStatus (t * testing.T , ctx context.Context , client * Client , stackID , deploymentName , status string ) {
344
- // pollStackDeployments will poll the given stack until it has deployments or the deadline is reached.
345
- ctx , cancel := context .WithDeadline (ctx , time .Now ().Add (5 * time .Minute ))
346
- defer cancel ()
347
-
348
- deadline , _ := ctx .Deadline ()
349
- t .Logf ("Polling stack %q for deployments with deadline of %s" , stackID , deadline )
350
-
351
- ticker := time .NewTicker (2 * time .Second )
352
- defer ticker .Stop ()
353
-
354
- for finished := false ; ! finished ; {
355
- t .Log ("..." )
356
- select {
357
- case <- ctx .Done ():
358
- t .Fatalf ("Stack deployment %s/%s did not have status %q at deadline" , stackID , deploymentName , status )
359
- case <- ticker .C :
360
- var err error
361
- deployment , err := client .StackDeployments .Read (ctx , stackID , deploymentName )
362
- if err != nil {
363
- t .Fatalf ("Failed to read stack deployment %s/%s: %s" , stackID , deploymentName , err )
364
- }
365
-
366
- t .Logf ("Stack deployment %s/%s had status %q" , stackID , deploymentName , deployment .Status )
367
- if deployment .Status == status {
368
- finished = true
369
- }
370
- }
371
- }
372
- }
373
-
374
343
func pollStackConfigurationStatus (t * testing.T , ctx context.Context , client * Client , stackConfigID , status string ) (stackConfig * StackConfiguration ) {
375
344
// pollStackDeployments will poll the given stack until it has deployments or the deadline is reached.
376
345
ctx , cancel := context .WithDeadline (ctx , time .Now ().Add (5 * time .Minute ))
@@ -440,9 +409,5 @@ func TestStackConverged(t *testing.T) {
440
409
require .ElementsMatch (t , deployments , stack .DeploymentNames )
441
410
require .NotNil (t , stack .LatestStackConfiguration )
442
411
443
- for _ , deployment := range deployments {
444
- pollStackDeploymentStatus (t , ctx , client , stack .ID , deployment , "paused" )
445
- }
446
-
447
412
pollStackConfigurationStatus (t , ctx , client , stack .LatestStackConfiguration .ID , "converged" )
448
413
}
0 commit comments