Skip to content

Commit

Permalink
Update aws/ecs_cluster_test.go
Browse files Browse the repository at this point in the history
Handling errors explicitly here

Co-authored-by: Yevgeniy Brikman <[email protected]>
  • Loading branch information
ina-stoyanova and brikis98 authored Oct 8, 2020
1 parent a37d16a commit d7a8c2b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions aws/ecs_cluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,10 @@ func TestCanListAllEcsClustersOlderThan24hours(t *testing.T) {
var olderClusterTagValue = now.Add(time.Hour * time.Duration(-48)).Format(time.RFC3339)
var youngerClusterTagValue = now.Add(time.Hour * time.Duration(-23)).Format(time.RFC3339)

tagEcsCluster(awsSession, cluster1.ClusterArn, firstSeenTagKey, olderClusterTagValue)
tagEcsCluster(awsSession, cluster2.ClusterArn, firstSeenTagKey, youngerClusterTagValue)
require.NoError(t, err)
err1 := tagEcsCluster(awsSession, cluster1.ClusterArn, firstSeenTagKey, olderClusterTagValue)
require.NoError(t, err1)
err2 := tagEcsCluster(awsSession, cluster2.ClusterArn, firstSeenTagKey, youngerClusterTagValue)
require.NoError(t, err2)

last24Hours := now.Add(time.Hour * time.Duration(-24))
filteredClusterArns, err := getAllEcsClustersOlderThan(awsSession, region, last24Hours)
Expand Down

0 comments on commit d7a8c2b

Please sign in to comment.