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

Adding fault injection integ tests #4399

Closed mye956 closed 1 month ago

mye956 commented 1 month ago

Summary

This PR will introduce new integration tests that will tests running the new fault injection endpoints within TMDS in parallel. These tests will only be running for linux and will need sudo permissions to run the utility tools such as iptables and tc

Implementation details

Testing

Manually ran the tests:

--- PASS: TestParallelNetworkFaults (72.19s)
    --- PASS: TestParallelNetworkFaults/network_black_hole_port_same_type (12.03s)
    --- PASS: TestParallelNetworkFaults/network_latency_same_type (12.03s)
    --- PASS: TestParallelNetworkFaults/network_packet_loss_same_type (12.04s)
    --- PASS: TestParallelNetworkFaults/network_latency_and_packet_loss_different_type (12.03s)
    --- PASS: TestParallelNetworkFaults/network_black_hole_port_and_latency_different_type (12.03s)
    --- PASS: TestParallelNetworkFaults/network_black_hole_port_and_packet_loss_different_type (12.03s)
PASS
ok      github.com/aws/amazon-ecs-agent/ecs-agent/tmds/handlers/fault/v1/handlers       72.193s

New tests cover the changes: yes

Description for the changelog

Feature: Adding fault injection integration tests

Additional Information

Does this PR include breaking model changes? If so, Have you added transformation functions?

**Does this PR include the addition of new environment variables in the README?**

Licensing

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