1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/test
Deiwin Sarjas e970ae102c ecs_ecr: Fix AWS ECR repository creation (#34798)
* ecs_ecr: Remove registry ID from create repository call

[Boto3 documentation][1] specifies 'repositoryName' as the only expected
argument. The `**build_kwargs(registry_id)` part also adds 'registryId' which,
when executed, fails with: 'Unknown parameter in input: “registryId”, must be
one of: repositoryName'.

[AWS API documentation][2] also lists only the 'repositoryName' parameter. I.e.
this is not a problem with the boto3 library.

The default registry ID for the account that's making the request will be used
when creating the rpository. This means that if the `registry_id` specified by
the user is different from the default registry ID, then the policy changes
following the repository creation would fail, because the repository will have
been created in one repository but subsequent calls try to modify it in
another. Added a safeguard against this scenario.

[1]: https://boto3.readthedocs.io/en/latest/reference/services/ecr.html#ECR.Client.create_repository
[2]: https://docs.aws.amazon.com/AmazonECR/latest/APIReference/API_CreateRepository.html

* Fix concurrent ECR integration tests

If the `ecr_name` is the same in multiple concurrent test runs, then they can
interfere with one another causing both to fail. The `resource_prefix` is
guaranteed to be unique for different jobs running in CI an so avoids this
issue while also making it easier to identify the test which created the
resource.
2018-01-24 10:42:41 +10:00
..
cache Update ansible-test sanity command. (#31958) 2017-10-26 00:21:46 -07:00
compile Fix Python 3.7 syntax error in yum_repository. 2018-01-09 17:54:10 -08:00
integration ecs_ecr: Fix AWS ECR repository creation (#34798) 2018-01-24 10:42:41 +10:00
legacy vultr: add integration tests (#35157) 2018-01-21 22:54:12 +01:00
results Collect data from integration test runs. (#28650) 2017-08-25 18:14:47 -04:00
runner Revert "Move requirements into tests. (#35197)" 2018-01-23 10:54:25 -08:00
sanity ACI: Rename aci_intf_policy_* to aci_interface_policy_* (#35170) 2018-01-22 12:40:15 +01:00
units Remove deprecated code (#34828) 2018-01-23 12:02:09 -06:00
utils Skip coverage on routine CI runs. 2018-01-23 10:38:38 -08:00