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
Fix custom amis import #5697
Fix custom amis import #5697
Conversation
if custom amis are specified via MOTO_AMIS_PATH env var, then do not import default amis
Some context, in case you hadn't seen it yet: all tests in I haven't really sat down to think about how to do this - but maybe we can simply run this test from a separate folder, something like Let me know if you want me to take a closer look. |
Thanks for looking @bblommers . I saw this behaviour when testing locally:
but running these fellas individually works:
I will see if a bit of tinkering with the makefile will help. |
Hey @bblommers this is ready for a review, now lemme know what you think. I changed the Clearly this changes the CI a little bit but because the "regular" unit tests pass then perhaps it's ok. |
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.
Thanks @rafcio19! I've refactored the test a bit - it now resets and re-imports the EC2-backend after setting the env variable. That way we can remove any existing AMI's, and only load our custom AMI, but without having to worry about running pytest
multiple times.
This is now part of moto >= 4.0.11.dev27 |
If custom amis are specified via
MOTO_AMIS_PATH
env var, then do not import default amis.Resolves #5677