Skip to content

Commit

Permalink
updating tests so they test specifically if the expect ECS Cluster is…
Browse files Browse the repository at this point in the history
… returned, instead of counting ECS clusters
  • Loading branch information
ina-stoyanova committed Oct 12, 2020
1 parent d84b842 commit 7ff3d8d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions aws/ecs_cluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func TestCanListAllEcsClustersOlderThan24hours(t *testing.T) {
filteredClusterArns, err := getAllEcsClustersOlderThan(awsSession, region, last24Hours)
require.NoError(t, err)

assert.Equal(t, 1, len(filteredClusterArns))
assert.Contains(t, awsgo.StringValueSlice(filteredClusterArns), awsgo.StringValue(cluster1.ClusterArn))
}

// Test we can nuke all ECS clusters older than 24hrs
Expand Down Expand Up @@ -111,5 +111,6 @@ func TestCanNukeAllEcsClustersOlderThan24Hours(t *testing.T) {
allLeftClusterArns, err := getAllEcsClusters(awsSession)
require.NoError(t, err)

assert.Equal(t, 1, len(allLeftClusterArns))
assert.Contains(t, awsgo.StringValueSlice(allLeftClusterArns), awsgo.StringValue(cluster2.ClusterArn))
}

0 comments on commit 7ff3d8d

Please sign in to comment.