Skip to content

Commit f7faf52

Browse files
committed
fix: ensure cleanup of service
Previous fix in 26c7177 did not ensure cleanup of the service if the TestServiceUp call failed. This would lead to situations in which cluster deletion would fail in the TestCreateClusterWithFargateService integration test because the cluster still contained an "active" service.
1 parent 0dd2434 commit f7faf52

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

ecs-cli/integ/e2e/fargate_service_test.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,11 @@ func TestCreateClusterWithFargateService(t *testing.T) {
4646
defer os.Remove(project.ComposeFileName)
4747
defer os.Remove(project.ECSParamsFileName)
4848

49-
// Create a new service
50-
cmd.TestServiceUp(t, project)
51-
5249
// Ensure cleanup of service
5350
defer cmd.TestServiceDown(t, project)
5451

52+
// Create a new service
53+
cmd.TestServiceUp(t, project)
5554
cmd.TestServicePs(t, project, 1)
5655

5756
// Increase the number of running tasks

0 commit comments

Comments
 (0)