Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase test coverage of some ACS responders #3826

Merged
merged 1 commit into from
Jul 25, 2023

Conversation

danehlim
Copy link
Contributor

Summary

Test coverage in ecs-agent module for some ACS responders are lower than the module's current MINIMUM_TEST_COVERAGE defined here. Currently, most areas where coverage is missing in the ecs-agent module for ACS message responders are actually tested in the agent module. Nevertheless, we should still add some further standalone testing to the ecs-agent module as it is its own separate module and the tests in agent module are not accounted for in the calculation of test coverage of ecs-agent module.

This pull request adds additional testing specifically for the attach task ENI, attach instance ENI, and attach resource responders in the ecs-agent module. Further testing may be added in future pull request(s).

No functionality aside from testing is modified as part of this pull request.

Implementation details

  • Generate new mocks to be used in the additional testing
  • Add additional testing to increase test coverage
  • Update testconst.ContainerInstanceARN value to be a legitimate/valid container instance ARN instead of just hardcoded text
  • go mod tidy and go mod vendor were run and ended up modifying the agent/vendor/github.com/aws/amazon-ecs-agent/ecs-agent/tmds/handlers/v4/state/response.go file as a result of a previous PR

Testing

Existing unit, integration, and functional tests.

New tests cover the changes: yes

Description for the changelog

Increase test coverage of some ACS responders

Licensing

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

@danehlim danehlim marked this pull request as ready for review July 24, 2023 21:29
@danehlim danehlim requested a review from a team as a code owner July 24, 2023 21:29
@danehlim danehlim merged commit 6ba7f1e into aws:dev Jul 25, 2023
6 checks passed
@chienhanlin chienhanlin mentioned this pull request Aug 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants