mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
awslogs: Fix a race in mockcwlogsclient
Signed-off-by: Samuel Karp <skarp@amazon.com>
This commit is contained in:
parent
53e2deb159
commit
c1ad02ccc8
1 changed files with 8 additions and 1 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue