aws / amazon-ecs-agent

Amazon Elastic Container Service Agent
http://aws.amazon.com/ecs/
Apache License 2.0
2.08k stars 616 forks source link

Add fault injection SourcesToFilter field in the request payload #4370

Closed tshan2001 closed 2 months ago

tshan2001 commented 2 months ago

Summary

Add fault injection SourcesToFilter field in the request payload.

Also incorporated the following comments from PR-4363

  1. In the request times out unit tests, use Do(func(){time.Sleep()}) instead of using -1 when creating context with timeout.
  2. Add logging when check latency and check packet loss is successful
  3. Add back the no-request-body test case for latency fault and packet loss fault

Implementation details

A new omitempty field SourcesToFilter has been added to the network latency and network packet loss request type, allowing.

Testing

All existing and newly added unit/integ tests passed.

New tests cover the changes: Unit tests have been modified to accommodate this new field. Added a new test case for when the IP address passed in for this field is invalid.

Description for the changelog

Add fault injection SourcesToFilter field in the request payload

Licensing

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.