Skip to content

Commit d92382a

Browse files
Update stack_integration_test.go
1 parent 867e966 commit d92382a

File tree

1 file changed

+0
-35
lines changed

1 file changed

+0
-35
lines changed

stack_integration_test.go

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -340,37 +340,6 @@ func pollStackDeployments(t *testing.T, ctx context.Context, client *Client, sta
340340
return
341341
}
342342

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-
374343
func pollStackConfigurationStatus(t *testing.T, ctx context.Context, client *Client, stackConfigID, status string) (stackConfig *StackConfiguration) {
375344
// pollStackDeployments will poll the given stack until it has deployments or the deadline is reached.
376345
ctx, cancel := context.WithDeadline(ctx, time.Now().Add(5*time.Minute))
@@ -440,9 +409,5 @@ func TestStackConverged(t *testing.T) {
440409
require.ElementsMatch(t, deployments, stack.DeploymentNames)
441410
require.NotNil(t, stack.LatestStackConfiguration)
442411

443-
for _, deployment := range deployments {
444-
pollStackDeploymentStatus(t, ctx, client, stack.ID, deployment, "paused")
445-
}
446-
447412
pollStackConfigurationStatus(t, ctx, client, stack.LatestStackConfiguration.ID, "converged")
448413
}

0 commit comments

Comments
 (0)