Skip to content

Commit

Permalink
Fix audit log path in functional tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sparrc committed Dec 17, 2019
1 parent 6d190e9 commit 388100e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions agent/functional_tests/tests/functionaltests_unix_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ func taskIAMRoles(networkMode string, agent *TestAgent, t *testing.T) {
require.Equal(t, 0, containerMetaData.State.ExitCode, fmt.Sprintf("Container exit code non-zero: %v", containerMetaData.State.ExitCode))

// Search the audit log to verify the credential request
err = utils.SearchStrInDir(filepath.Join(agent.TestDir, "log"), "audit.log.", *task.TaskArn)
err = utils.SearchStrInDir(filepath.Join(agent.TestDir, "log"), "audit.log", *task.TaskArn)
require.NoError(t, err, "Verify credential request failed")
}

Expand Down Expand Up @@ -807,8 +807,8 @@ func TestExecutionRole(t *testing.T) {
assert.Len(t, resp.Events, 1, fmt.Sprintf("Get unexpected number of log events: %d", len(resp.Events)))
assert.Equal(t, *resp.Events[0].Message, "hello world", fmt.Sprintf("Got log events message unexpected: %s", *resp.Events[0].Message))
// Search the audit log to verify the credential request from awslogs driver
err = utils.SearchStrInDir(filepath.Join(agent.TestDir, "log"), "audit.log.", "GetCredentialsExecutionRole")
err = utils.SearchStrInDir(filepath.Join(agent.TestDir, "log"), "audit.log.", *testTask.TaskArn)
err = utils.SearchStrInDir(filepath.Join(agent.TestDir, "log"), "audit.log", "GetCredentialsExecutionRole")
err = utils.SearchStrInDir(filepath.Join(agent.TestDir, "log"), "audit.log", *testTask.TaskArn)
require.NoError(t, err, "Verify credential request failed")
}

Expand Down

0 comments on commit 388100e

Please sign in to comment.