-
Notifications
You must be signed in to change notification settings - Fork 24
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
Testing workflow and paginated test fixes #41
Testing workflow and paginated test fixes #41
Conversation
This looks great! |
// instanceMatchesFilter converts the instance information to its string representation | ||
// and then checks that that information containes atleast one value in the | ||
// filter. This is a hack but should be sufficient for tests. | ||
func instanceMatchesFilter(instance ssm.InstanceInformation, filter ssm.InstanceInformationStringFilter) bool { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a hack, but i figured it would be sufficient for the sake of the limited needs of the mock and would be better than working with reflection to pull out field names or hard coding them. Please let me know if you feel otherwise though.
Manually tested everything after these changes and everything looked good as well. |
* Add devcontainer * Add Code Quality workflow * Fix unformatted code. * Remove the redundant G * WIP: Stub DescribeInstanceInformationPages * implement paginator mock * Add pagination and filtering to mock * Fix ec2 mocks traceback. * Fix EC2 tags tests * Remove extra newline * Add missing newline to code_quality.yml * format -> format.check * else -> happy path on mock conditionals * Add path to gofmt stage. * ec2 mocks test to ElementsMatch to ignore ordering
General
This PR includes test fixes, additional developer tooling and a new workflow.
Test Fixes
This PR implements a new method on the ssm and ec2 mocks respectively to cover paginator calls. After the included changes tests are passing again.
These changes are:
DescribeInstanceInformationPages
method in the ssm API mocksDescribeInstancesPages
method in the ec2 API mocksNew Workflow
This PR also introduces a new
code_quality
workflow that handles runningmake format
andmake test
on PR creation.Other Changes
In addition to the above fixes, this PR includes a few additional small changes
make format
to format branch