Closed arokem closed 4 months ago
I got the tests to succeed using moto[cloudformation]==4.1.5
.
It started succeeding with moto==4.1.10
. I chose this because 4.1.11
is where there were some changes to handling duplicate tags, according to the changelog:
- ECR: put_image(): now behaves correctly on duplicate images with duplicate tags
When I first tried with moto==4.1.10
, test_DockerImage
succeeded. However, test_pars_with_new_vpc
started to fail at cloudknot/tests/test_pars.py:298
:
An error occurred (DependencyViolation) when calling the DeleteStack operation: The vpc vpc-b2ae771a has dependencies and cannot be deleted.
I went back to the moto
changelog, and looked for where there were any potential changes to CloudFormation, and found 4.1.6
changed how stack deletion was handled:
- CloudFormation now supports deletion of AWS::EC2::Subnet, AWS::EC2::VPC
- CloudFormation now supports variable mapping inside "Fn::Sub"
- CloudFormation: delete_stack() now adheres to "DeletionPolicy": "Retain" set for individual resources
So, I set moto==4.1.5
and it worked!
There is one warning that we might want to check out:
cloudknot/tests/test_knot.py::test_knot
. . . moto/ec2/models/instances.py:140: PendingDeprecationWarning: Could not find AMI with image-id:None, in the near future this will cause an error.
Use ec2_backend.describe_images() to find suitable image for your test
Superseded by #307
Hopefully closes #305.