Skip to content

Commit

Permalink
Merge pull request #59 from trussworks/test_fix
Browse files Browse the repository at this point in the history
Correctly Purge CW Log during tf destroy
  • Loading branch information
mr337 authored Feb 4, 2021
2 parents 064d091 + 0b39c17 commit f77bf36
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/terraform_aws_sleuth_simple_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ func TestTerraformSimpleSanityCheck(t *testing.T) {
// lets try to invoke the lambda to ensure proper setup
_, err := aws.InvokeFunctionE(t, awsRegion, "iam-sleuth-test", FunctionPayload{ShouldFail: false, Echo: "hi!"})

// Sleep here to let all the lambda logs in flight write to log group.
// Failing to sleep here will recreate the log group after tf destroy
time.Sleep(60 * time.Second)

// Function-specific errors have their own special return, should be nil
functionError, ok := err.(*aws.FunctionError)
require.False(t, ok)
Expand Down

0 comments on commit f77bf36

Please sign in to comment.