Merge pull request #22985 from samuelkarp/awslogs-logging-driver
awslogs: Fix a race in mockcwlogsclient Upstream-commit: dca92044beaada248c4bab07c1bb9d38be1cf5aa Component: engine
This commit is contained in:
@ -44,7 +44,14 @@ func (m *mockcwlogsclient) CreateLogStream(input *cloudwatchlogs.CreateLogStream
|
||||
}
|
||||
|
||||
func (m *mockcwlogsclient) PutLogEvents(input *cloudwatchlogs.PutLogEventsInput) (*cloudwatchlogs.PutLogEventsOutput, error) {
|
||||
m.putLogEventsArgument <- input
|
||||
events := make([]*cloudwatchlogs.InputLogEvent, len(input.LogEvents))
|
||||
copy(events, input.LogEvents)
|
||||
m.putLogEventsArgument <- &cloudwatchlogs.PutLogEventsInput{
|
||||
LogEvents: events,
|
||||
SequenceToken: input.SequenceToken,
|
||||
LogGroupName: input.LogGroupName,
|
||||
LogStreamName: input.LogStreamName,
|
||||
}
|
||||
output := <-m.putLogEventsResult
|
||||
return output.successResult, output.errorResult
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user