aws-sam-cli icon indicating copy to clipboard operation
aws-sam-cli copied to clipboard

chore(tests): Refactor tests to support easily invoking AL2023 based runtimes

Open lucashuy opened this issue 9 months ago • 0 comments

Which issue(s) does this change fix?

None

Why is this change necessary?

Our Windows testing environment does not have the latest version of Docker installed inside of it, causing issues when invoking AL2023 based runtime images. This results in skipping the AL2023 based runtime tests specifically for Docker.

How does it address the issue?

Splits up the test cases that use Docker and test the new AL2023 based runtime images into two. AL2023 based tests are then marked with a pytest marker to make them easily toggle-able within the pytest command.

The two tests will be running the same testing parameters and assert conditions.

The goal at the end of this (follow up PR to address the other tests), is to remove the runtime_supported_by_docker() method, and to instead have two separate test methods marked by pytest decorators.

What side effects does this change have?

None.

Mandatory Checklist

PRs will only be reviewed after checklist is complete

  • [ ] Add input/output type hints to new functions/methods
  • [ ] Write design document if needed (Do I need to write a design document?)
  • [ ] Write/update unit tests
  • [x] Write/update integration tests
  • [ ] Write/update functional tests if needed
  • [x] make pr passes
  • [ ] make update-reproducible-reqs if dependencies were changed
  • [ ] Write documentation

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

lucashuy avatar May 15 '24 21:05 lucashuy