From 975f66f2eebe9dadba04f275774d4ab83f74cf25 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 13 Apr 2024 14:04:41 +0200 Subject: Adding upstream version 7.7.0+dfsg. Signed-off-by: Daniel Baumann --- .../community/rabbitmq/.azure-pipelines/README.md | 3 + .../rabbitmq/.azure-pipelines/azure-pipelines.yml | 361 +++++ .../.azure-pipelines/scripts/aggregate-coverage.sh | 20 + .../.azure-pipelines/scripts/combine-coverage.py | 60 + .../.azure-pipelines/scripts/process-results.sh | 24 + .../.azure-pipelines/scripts/publish-codecov.sh | 27 + .../.azure-pipelines/scripts/report-coverage.sh | 15 + .../rabbitmq/.azure-pipelines/scripts/run-tests.sh | 34 + .../.azure-pipelines/scripts/time-command.py | 25 + .../.azure-pipelines/templates/coverage.yml | 39 + .../rabbitmq/.azure-pipelines/templates/matrix.yml | 55 + .../rabbitmq/.azure-pipelines/templates/test.yml | 45 + ansible_collections/community/rabbitmq/.gitignore | 5 + .../community/rabbitmq/CHANGELOG.rst | 116 ++ .../community/rabbitmq/CONTRIBUTING.md | 5 + ansible_collections/community/rabbitmq/COPYING | 674 +++++++++ ansible_collections/community/rabbitmq/FILES.json | 1566 ++++++++++++++++++++ ansible_collections/community/rabbitmq/MAINTAINERS | 4 + .../community/rabbitmq/MAINTAINING.md | 3 + .../community/rabbitmq/MANIFEST.json | 31 + .../community/rabbitmq/PSF-license.txt | 48 + ansible_collections/community/rabbitmq/README.md | 212 +++ .../community/rabbitmq/changelogs/changelog.yaml | 120 ++ .../community/rabbitmq/changelogs/config.yaml | 31 + .../community/rabbitmq/meta/runtime.yml | 2 + .../rabbitmq/plugins/doc_fragments/__init__.py | 0 .../rabbitmq/plugins/doc_fragments/rabbitmq.py | 60 + .../community/rabbitmq/plugins/lookup/rabbitmq.py | 189 +++ .../rabbitmq/plugins/module_utils/_version.py | 343 +++++ .../rabbitmq/plugins/module_utils/rabbitmq.py | 230 +++ .../rabbitmq/plugins/module_utils/version.py | 16 + .../rabbitmq/plugins/modules/rabbitmq_binding.py | 298 ++++ .../rabbitmq/plugins/modules/rabbitmq_exchange.py | 234 +++ .../plugins/modules/rabbitmq_feature_flag.py | 98 ++ .../plugins/modules/rabbitmq_global_parameter.py | 158 ++ .../rabbitmq/plugins/modules/rabbitmq_parameter.py | 155 ++ .../rabbitmq/plugins/modules/rabbitmq_plugin.py | 187 +++ .../rabbitmq/plugins/modules/rabbitmq_policy.py | 253 ++++ .../rabbitmq/plugins/modules/rabbitmq_publish.py | 247 +++ .../rabbitmq/plugins/modules/rabbitmq_queue.py | 264 ++++ .../rabbitmq/plugins/modules/rabbitmq_upgrade.py | 127 ++ .../rabbitmq/plugins/modules/rabbitmq_user.py | 567 +++++++ .../plugins/modules/rabbitmq_user_limits.py | 217 +++ .../rabbitmq/plugins/modules/rabbitmq_vhost.py | 142 ++ .../plugins/modules/rabbitmq_vhost_limits.py | 174 +++ .../integration/targets/lookup_rabbitmq/aliases | 7 + .../targets/lookup_rabbitmq/meta/main.yml | 2 + .../targets/lookup_rabbitmq/tasks/main.yml | 5 + .../targets/lookup_rabbitmq/tasks/ubuntu.yml | 152 ++ .../integration/targets/rabbitmq_binding/aliases | 6 + .../targets/rabbitmq_binding/meta/main.yml | 2 + .../targets/rabbitmq_binding/tasks/main.yml | 3 + .../targets/rabbitmq_binding/tasks/tests.yml | 132 ++ .../targets/rabbitmq_exchange/meta/main.yml | 3 + .../targets/rabbitmq_exchange/tasks/main.yml | 31 + .../targets/rabbitmq_feature_flag/aliases | 6 + .../targets/rabbitmq_feature_flag/meta/main.yml | 2 + .../targets/rabbitmq_feature_flag/tasks/main.yml | 2 + .../targets/rabbitmq_feature_flag/tasks/tests.yml | 61 + .../targets/rabbitmq_global_parameter/aliases | 6 + .../rabbitmq_global_parameter/meta/main.yml | 2 + .../rabbitmq_global_parameter/tasks/main.yml | 2 + .../rabbitmq_global_parameter/tasks/tests.yml | 67 + .../integration/targets/rabbitmq_plugin/aliases | 6 + .../targets/rabbitmq_plugin/meta/main.yml | 2 + .../targets/rabbitmq_plugin/tasks/main.yml | 2 + .../targets/rabbitmq_plugin/tasks/tests.yml | 137 ++ .../integration/targets/rabbitmq_policy/aliases | 6 + .../targets/rabbitmq_policy/meta/main.yml | 2 + .../targets/rabbitmq_policy/tasks/main.yml | 2 + .../targets/rabbitmq_policy/tasks/tests.yml | 92 ++ .../integration/targets/rabbitmq_publish/aliases | 6 + .../targets/rabbitmq_publish/files/image.gif | Bin 0 -> 43 bytes .../targets/rabbitmq_publish/meta/main.yml | 3 + .../targets/rabbitmq_publish/tasks/main.yml | 5 + .../targets/rabbitmq_publish/tasks/ubuntu.yml | 274 ++++ .../integration/targets/rabbitmq_queue/aliases | 6 + .../targets/rabbitmq_queue/meta/main.yml | 3 + .../targets/rabbitmq_queue/tasks/main.yml | 5 + .../targets/rabbitmq_queue/tasks/ubuntu.yml | 31 + .../integration/targets/rabbitmq_upgrade/aliases | 6 + .../targets/rabbitmq_upgrade/meta/main.yml | 2 + .../targets/rabbitmq_upgrade/tasks/main.yml | 2 + .../targets/rabbitmq_upgrade/tasks/tests.yml | 182 +++ .../integration/targets/rabbitmq_user/aliases | 6 + .../targets/rabbitmq_user/meta/main.yml | 2 + .../targets/rabbitmq_user/tasks/main.yml | 10 + .../targets/rabbitmq_user/tasks/tests.yml | 125 ++ .../targets/rabbitmq_user_limits/aliases | 6 + .../targets/rabbitmq_user_limits/meta/main.yml | 2 + .../targets/rabbitmq_user_limits/tasks/main.yml | 5 + .../targets/rabbitmq_user_limits/tasks/ubuntu.yml | 163 ++ .../integration/targets/rabbitmq_vhost/aliases | 6 + .../targets/rabbitmq_vhost/meta/main.yml | 2 + .../targets/rabbitmq_vhost/tasks/main.yml | 2 + .../targets/rabbitmq_vhost/tasks/tests.yml | 121 ++ .../targets/rabbitmq_vhost_limits/aliases | 6 + .../targets/rabbitmq_vhost_limits/meta/main.yml | 2 + .../targets/rabbitmq_vhost_limits/tasks/main.yml | 5 + .../targets/rabbitmq_vhost_limits/tasks/ubuntu.yml | 163 ++ .../targets/setup_rabbitmq/files/rabbitmq.conf | 9 + .../targets/setup_rabbitmq/meta/main.yml | 3 + .../targets/setup_rabbitmq/tasks/main.yml | 10 + .../targets/setup_rabbitmq/tasks/ubuntu.yml | 105 ++ .../targets/setup_remote_tmp_dir/handlers/main.yml | 5 + .../setup_remote_tmp_dir/tasks/default-cleanup.yml | 5 + .../targets/setup_remote_tmp_dir/tasks/default.yml | 11 + .../targets/setup_remote_tmp_dir/tasks/main.yml | 10 + .../targets/setup_tls/files/ca_certificate.pem | 19 + .../integration/targets/setup_tls/files/ca_key.pem | 28 + .../targets/setup_tls/files/client_certificate.pem | 20 + .../targets/setup_tls/files/client_key.pem | 27 + .../targets/setup_tls/files/server_certificate.pem | 20 + .../targets/setup_tls/files/server_key.pem | 27 + .../integration/targets/setup_tls/tasks/main.yml | 21 + .../rabbitmq/tests/sanity/ignore-2.10.txt | 2 + .../rabbitmq/tests/sanity/ignore-2.11.txt | 2 + .../rabbitmq/tests/sanity/ignore-2.12.txt | 2 + .../rabbitmq/tests/sanity/ignore-2.13.txt | 2 + .../rabbitmq/tests/sanity/ignore-2.14.txt | 2 + .../rabbitmq/tests/sanity/ignore-2.15.txt | 2 + .../community/rabbitmq/tests/sanity/ignore-2.9.txt | 2 + .../community/rabbitmq/tests/sanity/ignore.txt | 2 + .../rabbitmq/tests/unit/compat/__init__.py | 0 .../rabbitmq/tests/unit/compat/builtins.py | 33 + .../community/rabbitmq/tests/unit/compat/mock.py | 122 ++ .../rabbitmq/tests/unit/compat/unittest.py | 38 + .../community/rabbitmq/tests/unit/mock/__init__.py | 0 .../community/rabbitmq/tests/unit/mock/loader.py | 116 ++ .../community/rabbitmq/tests/unit/mock/path.py | 8 + .../community/rabbitmq/tests/unit/mock/procenv.py | 90 ++ .../rabbitmq/tests/unit/mock/vault_helper.py | 39 + .../rabbitmq/tests/unit/mock/yaml_helper.py | 124 ++ .../tests/unit/modules/rabbitmq_user_fixtures.py | 181 +++ .../unit/modules/test_rabbitmq_feature_flag.py | 62 + .../unit/modules/test_rabbitmq_global_parameter.py | 127 ++ .../tests/unit/modules/test_rabbitmq_upgrade.py | 201 +++ .../tests/unit/modules/test_rabbitmq_user.py | 533 +++++++ .../community/rabbitmq/tests/unit/modules/utils.py | 50 + .../rabbitmq/tests/utils/shippable/check_matrix.py | 120 ++ .../rabbitmq/tests/utils/shippable/cloud.sh | 19 + .../rabbitmq/tests/utils/shippable/freebsd.sh | 22 + .../rabbitmq/tests/utils/shippable/linux.sh | 18 + .../rabbitmq/tests/utils/shippable/osx.sh | 22 + .../rabbitmq/tests/utils/shippable/remote.sh | 22 + .../rabbitmq/tests/utils/shippable/rhel.sh | 22 + .../rabbitmq/tests/utils/shippable/sanity.sh | 27 + .../rabbitmq/tests/utils/shippable/shippable.sh | 212 +++ .../rabbitmq/tests/utils/shippable/timing.py | 16 + .../rabbitmq/tests/utils/shippable/timing.sh | 5 + .../rabbitmq/tests/utils/shippable/units.sh | 14 + 151 files changed, 11954 insertions(+) create mode 100644 ansible_collections/community/rabbitmq/.azure-pipelines/README.md create mode 100644 ansible_collections/community/rabbitmq/.azure-pipelines/azure-pipelines.yml create mode 100755 ansible_collections/community/rabbitmq/.azure-pipelines/scripts/aggregate-coverage.sh create mode 100755 ansible_collections/community/rabbitmq/.azure-pipelines/scripts/combine-coverage.py create mode 100755 ansible_collections/community/rabbitmq/.azure-pipelines/scripts/process-results.sh create mode 100755 ansible_collections/community/rabbitmq/.azure-pipelines/scripts/publish-codecov.sh create mode 100755 ansible_collections/community/rabbitmq/.azure-pipelines/scripts/report-coverage.sh create mode 100755 ansible_collections/community/rabbitmq/.azure-pipelines/scripts/run-tests.sh create mode 100755 ansible_collections/community/rabbitmq/.azure-pipelines/scripts/time-command.py create mode 100644 ansible_collections/community/rabbitmq/.azure-pipelines/templates/coverage.yml create mode 100644 ansible_collections/community/rabbitmq/.azure-pipelines/templates/matrix.yml create mode 100644 ansible_collections/community/rabbitmq/.azure-pipelines/templates/test.yml create mode 100644 ansible_collections/community/rabbitmq/.gitignore create mode 100644 ansible_collections/community/rabbitmq/CHANGELOG.rst create mode 100644 ansible_collections/community/rabbitmq/CONTRIBUTING.md create mode 100644 ansible_collections/community/rabbitmq/COPYING create mode 100644 ansible_collections/community/rabbitmq/FILES.json create mode 100644 ansible_collections/community/rabbitmq/MAINTAINERS create mode 100644 ansible_collections/community/rabbitmq/MAINTAINING.md create mode 100644 ansible_collections/community/rabbitmq/MANIFEST.json create mode 100644 ansible_collections/community/rabbitmq/PSF-license.txt create mode 100644 ansible_collections/community/rabbitmq/README.md create mode 100644 ansible_collections/community/rabbitmq/changelogs/changelog.yaml create mode 100644 ansible_collections/community/rabbitmq/changelogs/config.yaml create mode 100644 ansible_collections/community/rabbitmq/meta/runtime.yml create mode 100644 ansible_collections/community/rabbitmq/plugins/doc_fragments/__init__.py create mode 100644 ansible_collections/community/rabbitmq/plugins/doc_fragments/rabbitmq.py create mode 100644 ansible_collections/community/rabbitmq/plugins/lookup/rabbitmq.py create mode 100644 ansible_collections/community/rabbitmq/plugins/module_utils/_version.py create mode 100644 ansible_collections/community/rabbitmq/plugins/module_utils/rabbitmq.py create mode 100644 ansible_collections/community/rabbitmq/plugins/module_utils/version.py create mode 100644 ansible_collections/community/rabbitmq/plugins/modules/rabbitmq_binding.py create mode 100644 ansible_collections/community/rabbitmq/plugins/modules/rabbitmq_exchange.py create mode 100644 ansible_collections/community/rabbitmq/plugins/modules/rabbitmq_feature_flag.py create mode 100644 ansible_collections/community/rabbitmq/plugins/modules/rabbitmq_global_parameter.py create mode 100644 ansible_collections/community/rabbitmq/plugins/modules/rabbitmq_parameter.py create mode 100644 ansible_collections/community/rabbitmq/plugins/modules/rabbitmq_plugin.py create mode 100644 ansible_collections/community/rabbitmq/plugins/modules/rabbitmq_policy.py create mode 100644 ansible_collections/community/rabbitmq/plugins/modules/rabbitmq_publish.py create mode 100644 ansible_collections/community/rabbitmq/plugins/modules/rabbitmq_queue.py create mode 100644 ansible_collections/community/rabbitmq/plugins/modules/rabbitmq_upgrade.py create mode 100644 ansible_collections/community/rabbitmq/plugins/modules/rabbitmq_user.py create mode 100644 ansible_collections/community/rabbitmq/plugins/modules/rabbitmq_user_limits.py create mode 100644 ansible_collections/community/rabbitmq/plugins/modules/rabbitmq_vhost.py create mode 100644 ansible_collections/community/rabbitmq/plugins/modules/rabbitmq_vhost_limits.py create mode 100644 ansible_collections/community/rabbitmq/tests/integration/targets/lookup_rabbitmq/aliases create mode 100644 ansible_collections/community/rabbitmq/tests/integration/targets/lookup_rabbitmq/meta/main.yml create mode 100644 ansible_collections/community/rabbitmq/tests/integration/targets/lookup_rabbitmq/tasks/main.yml create mode 100644 ansible_collections/community/rabbitmq/tests/integration/targets/lookup_rabbitmq/tasks/ubuntu.yml create mode 100644 ansible_collections/community/rabbitmq/tests/integration/targets/rabbitmq_binding/aliases create mode 100644 ansible_collections/community/rabbitmq/tests/integration/targets/rabbitmq_binding/meta/main.yml create mode 100644 ansible_collections/community/rabbitmq/tests/integration/targets/rabbitmq_binding/tasks/main.yml create mode 100644 ansible_collections/community/rabbitmq/tests/integration/targets/rabbitmq_binding/tasks/tests.yml create mode 100644 ansible_collections/community/rabbitmq/tests/integration/targets/rabbitmq_exchange/meta/main.yml create mode 100644 ansible_collections/community/rabbitmq/tests/integration/targets/rabbitmq_exchange/tasks/main.yml create mode 100644 ansible_collections/community/rabbitmq/tests/integration/targets/rabbitmq_feature_flag/aliases create mode 100644 ansible_collections/community/rabbitmq/tests/integration/targets/rabbitmq_feature_flag/meta/main.yml create mode 100644 ansible_collections/community/rabbitmq/tests/integration/targets/rabbitmq_feature_flag/tasks/main.yml create mode 100644 ansible_collections/community/rabbitmq/tests/integration/targets/rabbitmq_feature_flag/tasks/tests.yml create mode 100644 ansible_collections/community/rabbitmq/tests/integration/targets/rabbitmq_global_parameter/aliases create mode 100644 ansible_collections/community/rabbitmq/tests/integration/targets/rabbitmq_global_parameter/meta/main.yml create mode 100644 ansible_collections/community/rabbitmq/tests/integration/targets/rabbitmq_global_parameter/tasks/main.yml create mode 100644 ansible_collections/community/rabbitmq/tests/integration/targets/rabbitmq_global_parameter/tasks/tests.yml create mode 100644 ansible_collections/community/rabbitmq/tests/integration/targets/rabbitmq_plugin/aliases create mode 100644 ansible_collections/community/rabbitmq/tests/integration/targets/rabbitmq_plugin/meta/main.yml create mode 100644 ansible_collections/community/rabbitmq/tests/integration/targets/rabbitmq_plugin/tasks/main.yml create mode 100644 ansible_collections/community/rabbitmq/tests/integration/targets/rabbitmq_plugin/tasks/tests.yml create mode 100644 ansible_collections/community/rabbitmq/tests/integration/targets/rabbitmq_policy/aliases create mode 100644 ansible_collections/community/rabbitmq/tests/integration/targets/rabbitmq_policy/meta/main.yml create mode 100644 ansible_collections/community/rabbitmq/tests/integration/targets/rabbitmq_policy/tasks/main.yml create mode 100644 ansible_collections/community/rabbitmq/tests/integration/targets/rabbitmq_policy/tasks/tests.yml create mode 100644 ansible_collections/community/rabbitmq/tests/integration/targets/rabbitmq_publish/aliases create mode 100644 ansible_collections/community/rabbitmq/tests/integration/targets/rabbitmq_publish/files/image.gif create mode 100644 ansible_collections/community/rabbitmq/tests/integration/targets/rabbitmq_publish/meta/main.yml create mode 100644 ansible_collections/community/rabbitmq/tests/integration/targets/rabbitmq_publish/tasks/main.yml create mode 100644 ansible_collections/community/rabbitmq/tests/integration/targets/rabbitmq_publish/tasks/ubuntu.yml create mode 100644 ansible_collections/community/rabbitmq/tests/integration/targets/rabbitmq_queue/aliases create mode 100644 ansible_collections/community/rabbitmq/tests/integration/targets/rabbitmq_queue/meta/main.yml create mode 100644 ansible_collections/community/rabbitmq/tests/integration/targets/rabbitmq_queue/tasks/main.yml create mode 100644 ansible_collections/community/rabbitmq/tests/integration/targets/rabbitmq_queue/tasks/ubuntu.yml create mode 100644 ansible_collections/community/rabbitmq/tests/integration/targets/rabbitmq_upgrade/aliases create mode 100644 ansible_collections/community/rabbitmq/tests/integration/targets/rabbitmq_upgrade/meta/main.yml create mode 100644 ansible_collections/community/rabbitmq/tests/integration/targets/rabbitmq_upgrade/tasks/main.yml create mode 100644 ansible_collections/community/rabbitmq/tests/integration/targets/rabbitmq_upgrade/tasks/tests.yml create mode 100644 ansible_collections/community/rabbitmq/tests/integration/targets/rabbitmq_user/aliases create mode 100644 ansible_collections/community/rabbitmq/tests/integration/targets/rabbitmq_user/meta/main.yml create mode 100644 ansible_collections/community/rabbitmq/tests/integration/targets/rabbitmq_user/tasks/main.yml create mode 100644 ansible_collections/community/rabbitmq/tests/integration/targets/rabbitmq_user/tasks/tests.yml create mode 100644 ansible_collections/community/rabbitmq/tests/integration/targets/rabbitmq_user_limits/aliases create mode 100644 ansible_collections/community/rabbitmq/tests/integration/targets/rabbitmq_user_limits/meta/main.yml create mode 100644 ansible_collections/community/rabbitmq/tests/integration/targets/rabbitmq_user_limits/tasks/main.yml create mode 100644 ansible_collections/community/rabbitmq/tests/integration/targets/rabbitmq_user_limits/tasks/ubuntu.yml create mode 100644 ansible_collections/community/rabbitmq/tests/integration/targets/rabbitmq_vhost/aliases create mode 100644 ansible_collections/community/rabbitmq/tests/integration/targets/rabbitmq_vhost/meta/main.yml create mode 100644 ansible_collections/community/rabbitmq/tests/integration/targets/rabbitmq_vhost/tasks/main.yml create mode 100644 ansible_collections/community/rabbitmq/tests/integration/targets/rabbitmq_vhost/tasks/tests.yml create mode 100644 ansible_collections/community/rabbitmq/tests/integration/targets/rabbitmq_vhost_limits/aliases create mode 100644 ansible_collections/community/rabbitmq/tests/integration/targets/rabbitmq_vhost_limits/meta/main.yml create mode 100644 ansible_collections/community/rabbitmq/tests/integration/targets/rabbitmq_vhost_limits/tasks/main.yml create mode 100644 ansible_collections/community/rabbitmq/tests/integration/targets/rabbitmq_vhost_limits/tasks/ubuntu.yml create mode 100644 ansible_collections/community/rabbitmq/tests/integration/targets/setup_rabbitmq/files/rabbitmq.conf create mode 100644 ansible_collections/community/rabbitmq/tests/integration/targets/setup_rabbitmq/meta/main.yml create mode 100644 ansible_collections/community/rabbitmq/tests/integration/targets/setup_rabbitmq/tasks/main.yml create mode 100644 ansible_collections/community/rabbitmq/tests/integration/targets/setup_rabbitmq/tasks/ubuntu.yml create mode 100644 ansible_collections/community/rabbitmq/tests/integration/targets/setup_remote_tmp_dir/handlers/main.yml create mode 100644 ansible_collections/community/rabbitmq/tests/integration/targets/setup_remote_tmp_dir/tasks/default-cleanup.yml create mode 100644 ansible_collections/community/rabbitmq/tests/integration/targets/setup_remote_tmp_dir/tasks/default.yml create mode 100644 ansible_collections/community/rabbitmq/tests/integration/targets/setup_remote_tmp_dir/tasks/main.yml create mode 100644 ansible_collections/community/rabbitmq/tests/integration/targets/setup_tls/files/ca_certificate.pem create mode 100644 ansible_collections/community/rabbitmq/tests/integration/targets/setup_tls/files/ca_key.pem create mode 100644 ansible_collections/community/rabbitmq/tests/integration/targets/setup_tls/files/client_certificate.pem create mode 100644 ansible_collections/community/rabbitmq/tests/integration/targets/setup_tls/files/client_key.pem create mode 100644 ansible_collections/community/rabbitmq/tests/integration/targets/setup_tls/files/server_certificate.pem create mode 100644 ansible_collections/community/rabbitmq/tests/integration/targets/setup_tls/files/server_key.pem create mode 100644 ansible_collections/community/rabbitmq/tests/integration/targets/setup_tls/tasks/main.yml create mode 100644 ansible_collections/community/rabbitmq/tests/sanity/ignore-2.10.txt create mode 100644 ansible_collections/community/rabbitmq/tests/sanity/ignore-2.11.txt create mode 100644 ansible_collections/community/rabbitmq/tests/sanity/ignore-2.12.txt create mode 100644 ansible_collections/community/rabbitmq/tests/sanity/ignore-2.13.txt create mode 100644 ansible_collections/community/rabbitmq/tests/sanity/ignore-2.14.txt create mode 100644 ansible_collections/community/rabbitmq/tests/sanity/ignore-2.15.txt create mode 100644 ansible_collections/community/rabbitmq/tests/sanity/ignore-2.9.txt create mode 100644 ansible_collections/community/rabbitmq/tests/sanity/ignore.txt create mode 100644 ansible_collections/community/rabbitmq/tests/unit/compat/__init__.py create mode 100644 ansible_collections/community/rabbitmq/tests/unit/compat/builtins.py create mode 100644 ansible_collections/community/rabbitmq/tests/unit/compat/mock.py create mode 100644 ansible_collections/community/rabbitmq/tests/unit/compat/unittest.py create mode 100644 ansible_collections/community/rabbitmq/tests/unit/mock/__init__.py create mode 100644 ansible_collections/community/rabbitmq/tests/unit/mock/loader.py create mode 100644 ansible_collections/community/rabbitmq/tests/unit/mock/path.py create mode 100644 ansible_collections/community/rabbitmq/tests/unit/mock/procenv.py create mode 100644 ansible_collections/community/rabbitmq/tests/unit/mock/vault_helper.py create mode 100644 ansible_collections/community/rabbitmq/tests/unit/mock/yaml_helper.py create mode 100644 ansible_collections/community/rabbitmq/tests/unit/modules/rabbitmq_user_fixtures.py create mode 100644 ansible_collections/community/rabbitmq/tests/unit/modules/test_rabbitmq_feature_flag.py create mode 100644 ansible_collections/community/rabbitmq/tests/unit/modules/test_rabbitmq_global_parameter.py create mode 100644 ansible_collections/community/rabbitmq/tests/unit/modules/test_rabbitmq_upgrade.py create mode 100644 ansible_collections/community/rabbitmq/tests/unit/modules/test_rabbitmq_user.py create mode 100644 ansible_collections/community/rabbitmq/tests/unit/modules/utils.py create mode 100755 ansible_collections/community/rabbitmq/tests/utils/shippable/check_matrix.py create mode 100755 ansible_collections/community/rabbitmq/tests/utils/shippable/cloud.sh create mode 100755 ansible_collections/community/rabbitmq/tests/utils/shippable/freebsd.sh create mode 100755 ansible_collections/community/rabbitmq/tests/utils/shippable/linux.sh create mode 100755 ansible_collections/community/rabbitmq/tests/utils/shippable/osx.sh create mode 100755 ansible_collections/community/rabbitmq/tests/utils/shippable/remote.sh create mode 100755 ansible_collections/community/rabbitmq/tests/utils/shippable/rhel.sh create mode 100755 ansible_collections/community/rabbitmq/tests/utils/shippable/sanity.sh create mode 100755 ansible_collections/community/rabbitmq/tests/utils/shippable/shippable.sh create mode 100755 ansible_collections/community/rabbitmq/tests/utils/shippable/timing.py create mode 100755 ansible_collections/community/rabbitmq/tests/utils/shippable/timing.sh create mode 100755 ansible_collections/community/rabbitmq/tests/utils/shippable/units.sh (limited to 'ansible_collections/community/rabbitmq') diff --git a/ansible_collections/community/rabbitmq/.azure-pipelines/README.md b/ansible_collections/community/rabbitmq/.azure-pipelines/README.md new file mode 100644 index 000000000..385e70bac --- /dev/null +++ b/ansible_collections/community/rabbitmq/.azure-pipelines/README.md @@ -0,0 +1,3 @@ +## Azure Pipelines Configuration + +Please see the [Documentation](https://github.com/ansible/community/wiki/Testing:-Azure-Pipelines) for more information. diff --git a/ansible_collections/community/rabbitmq/.azure-pipelines/azure-pipelines.yml b/ansible_collections/community/rabbitmq/.azure-pipelines/azure-pipelines.yml new file mode 100644 index 000000000..7002adffa --- /dev/null +++ b/ansible_collections/community/rabbitmq/.azure-pipelines/azure-pipelines.yml @@ -0,0 +1,361 @@ +trigger: + batch: true + branches: + include: + - main + - stable-* + +pr: + autoCancel: true + branches: + include: + - main + - stable-* + +schedules: + - cron: 0 9 * * * + displayName: Nightly + always: true + branches: + include: + - main + - stable-* + +variables: + - name: checkoutPath + value: ansible_collections/community/rabbitmq + - name: coverageBranches + value: main + - name: pipelinesCoverage + value: coverage + - name: entryPoint + value: tests/utils/shippable/shippable.sh + - name: fetchDepth + value: 0 + +resources: + containers: + - container: default + image: quay.io/ansible/azure-pipelines-test-container:3.0.0 + +pool: Standard + +stages: +### Sanity & units + - stage: Ansible_devel + displayName: Sanity & Units devel + dependsOn: [] + jobs: + - template: templates/matrix.yml + parameters: + targets: + - name: Sanity + test: 'devel/sanity/1' + - name: Units + test: 'devel/units/1' + + - stage: Ansible_2_14 + displayName: Sanity & Units 2.14 + dependsOn: [] + jobs: + - template: templates/matrix.yml + parameters: + targets: + - name: Sanity + test: '2.14/sanity/1' + - name: Units + test: '2.14/units/1' + + - stage: Ansible_2_13 + displayName: Sanity & Units 2.13 + dependsOn: [] + jobs: + - template: templates/matrix.yml + parameters: + targets: + - name: Sanity + test: '2.13/sanity/1' + - name: Units + test: '2.13/units/1' + + - stage: Ansible_2_12 + displayName: Sanity & Units 2.12 + dependsOn: [] + jobs: + - template: templates/matrix.yml + parameters: + targets: + - name: Sanity + test: '2.12/sanity/1' + - name: Units + test: '2.12/units/1' + + - stage: Ansible_2_11 + displayName: Sanity & Units 2.11 + dependsOn: [] + jobs: + - template: templates/matrix.yml + parameters: + targets: + - name: Sanity + test: '2.11/sanity/1' + - name: Units + test: '2.11/units/1' + + - stage: Ansible_2_10 + displayName: Sanity & Units 2.10 + dependsOn: [] + jobs: + - template: templates/matrix.yml + parameters: + targets: + - name: Sanity + test: '2.10/sanity/1' + - name: Units + test: '2.10/units/1' + + - stage: Ansible_2_9 + displayName: Sanity & Units 2.9 + dependsOn: [] + jobs: + - template: templates/matrix.yml + parameters: + targets: + - name: Sanity + test: '2.9/sanity/1' + - name: Units + test: '2.9/units/1' + +### Docker + - stage: Docker_devel + displayName: Docker devel + dependsOn: [] + jobs: + - template: templates/matrix.yml + parameters: + # $ansible_version/$script/$test => devel / linux / ubuntu2004/1 + # shippable/linux.sh target=shippable/posix/group1 + # ansible-test integration ... shippable/posix/group1 --docker ubuntu2004 + # dir: integration/targets/ + testFormat: devel/linux/{0}/1 + targets: + # NOTE: update integration roles to support platform before enabling here. + #- name: CentOS 6 + # test: centos6 + #- name: CentOS 7 + # test: centos7 + #- name: Fedora 33 + # test: fedora33 + #- name: Fedora 34 + # test: fedora34 + #- name: openSUSE 15 py2 + # test: opensuse15py2 + #- name: openSUSE 15 py3 + # test: opensuse15 + #- name: Ubuntu 18.04 + # test: ubuntu1804 + - name: Ubuntu 22.04 + test: ubuntu2204 + # Currently 20.04 is causing devel to fail. This maybe due to Ubuntu 20.04 running python + # 3.8, however, ansible-test requires 3.9+. This means ansible test spins up a controller + # and target container which is probably why rabbitmq_publish is not able to connect to + # rabbitmq on localhost. + #- name: Ubuntu 20.04 + # test: ubuntu2004 + + - stage: Docker_2_14 + displayName: Docker 2.14 + dependsOn: [] + jobs: + - template: templates/matrix.yml + parameters: + testFormat: 2.14/linux/{0}/1 + targets: + - name: Ubuntu 22.04 + test: ubuntu2204 + # Currently 20.04 is causing devel to fail. This maybe due to Ubuntu 20.04 running python + # 3.8, however, ansible-test requires 3.9+. This means ansible test spins up a controller + # and target container which is probably why rabbitmq_publish is not able to connect to + # rabbitmq on localhost. + #- name: Ubuntu 20.04 + # test: ubuntu2004 + + - stage: Docker_2_13 + displayName: Docker 2.13 + dependsOn: [] + jobs: + - template: templates/matrix.yml + parameters: + testFormat: 2.13/linux/{0}/1 + targets: + #- name: Ubuntu 18.04 + # test: ubuntu1804 + - name: Ubuntu 20.04 + test: ubuntu2004 + + - stage: Docker_2_12 + displayName: Docker 2.12 + dependsOn: [] + jobs: + - template: templates/matrix.yml + parameters: + testFormat: 2.12/linux/{0}/1 + targets: + #- name: Ubuntu 18.04 + # test: ubuntu1804 + - name: Ubuntu 20.04 + test: ubuntu2004 + + - stage: Docker_2_11 + displayName: Docker 2.11 + dependsOn: [] + jobs: + - template: templates/matrix.yml + parameters: + testFormat: 2.11/linux/{0}/1 + targets: + # NOTE: update integration roles to support platform before enabling here. + #- name: CentOS 6 + # test: centos6 + #- name: CentOS 7 + # test: centos7 + #- name: Fedora 32 + # test: fedora32 + #- name: Fedora 33 + # test: fedora33 + #- name: openSUSE 15 py2 + # test: opensuse15py2 + #- name: openSUSE 15 py3 + # test: opensuse15 + - name: Ubuntu 18.04 + test: ubuntu1804 + - name: Ubuntu 20.04 + test: ubuntu2004 + + - stage: Docker_2_10 + displayName: Docker 2.10 + dependsOn: [] + jobs: + - template: templates/matrix.yml + parameters: + testFormat: 2.10/linux/{0}/1 + targets: + # NOTE: update integration roles to support platform before enabling here. + #- name: CentOS 6 + # test: centos6 + #- name: CentOS 7 + # test: centos7 + #- name: Fedora 31 + # test: fedora31 + #- name: Fedora 32 + # test: fedora32 + #- name: openSUSE 15 py2 + # test: opensuse15py2 + #- name: openSUSE 15 py3 + # test: opensuse15 + - name: Ubuntu 18.04 + test: ubuntu1804 + - name: Ubuntu 20.04 + test: ubuntu2004 + + - stage: Docker_2_9 + displayName: Docker 2.9 + dependsOn: [] + jobs: + - template: templates/matrix.yml + parameters: + testFormat: 2.9/linux/{0}/1 + targets: + # NOTE: update integration roles to support platform before adding here. + - name: Ubuntu 18.04 + test: ubuntu1804 # freezes in rabbitmq_setup + # ansible-test 2.9 does not support 20.04 (image not included in its test-containers list) + +### Remote +# - stage: Remote_devel +# displayName: Remote devel +# dependsOn: [] +# jobs: +# - template: templates/matrix.yml +# parameters: +# testFormat: devel/{0}/1 +# targets: +# - name: RHEL 7.9 +# test: rhel/7.9 +# - name: RHEL 8.3 +# test: rhel/8.3 +# - name: FreeBSD 11.4 +# test: freebsd/11.4 +# - name: FreeBSD 12.2 +# test: freebsd/12.2 +# - stage: Remote_2_11 +# displayName: Remote 2.11 +# dependsOn: [] +# jobs: +# - template: templates/matrix.yml +# parameters: +# testFormat: 2.11/{0}/1 +# targets: +# - name: RHEL 7.9 +# test: rhel/7.9 +# - name: RHEL 8.3 +# test: rhel/8.3 +# - name: FreeBSD 11.4 +# test: freebsd/11.4 +# - name: FreeBSD 12.2 +# test: freebsd/12.2 +# - stage: Remote_2_10 +# displayName: Remote 2.10 +# dependsOn: [] +# jobs: +# - template: templates/matrix.yml +# parameters: +# testFormat: 2.10/{0}/1 +# targets: +# - name: RHEL 7.8 +# test: rhel/7.8 +# - name: RHEL 8.2 +# test: rhel/8.2 +# - name: FreeBSD 11.1 +# test: freebsd/11.1 +# - name: FreeBSD 12.1 +# test: freebsd/12.1 +# - stage: Remote_2_9 +# displayName: Remote 2.9 +# dependsOn: [] +# jobs: +# - template: templates/matrix.yml +# parameters: +# testFormat: 2.9/{0}/1 +# targets: +# - name: RHEL 7.8 +# test: rhel/7.8 +# - name: RHEL 8.2 +# test: rhel/8.2 +# - name: FreeBSD 11.1 +# test: freebsd/11.1 +# - name: FreeBSD 12.1 +# test: freebsd/12.1 + - stage: Summary + condition: succeededOrFailed() + dependsOn: + - Ansible_devel + - Ansible_2_14 + - Ansible_2_13 + - Ansible_2_12 + - Ansible_2_11 + - Ansible_2_10 + - Ansible_2_9 + - Docker_devel + - Docker_2_14 + - Docker_2_13 + - Docker_2_12 + - Docker_2_11 + - Docker_2_10 + - Docker_2_9 + #- Remote_devel + #- Remote_2_11 + #- Remote_2_10 + #- Remote_2_9 + jobs: + - template: templates/coverage.yml diff --git a/ansible_collections/community/rabbitmq/.azure-pipelines/scripts/aggregate-coverage.sh b/ansible_collections/community/rabbitmq/.azure-pipelines/scripts/aggregate-coverage.sh new file mode 100755 index 000000000..f3113dd0a --- /dev/null +++ b/ansible_collections/community/rabbitmq/.azure-pipelines/scripts/aggregate-coverage.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env bash +# Aggregate code coverage results for later processing. + +set -o pipefail -eu + +agent_temp_directory="$1" + +PATH="${PWD}/bin:${PATH}" + +mkdir "${agent_temp_directory}/coverage/" + +options=(--venv --venv-system-site-packages --color -v) + +ansible-test coverage combine --export "${agent_temp_directory}/coverage/" "${options[@]}" + +if ansible-test coverage analyze targets generate --help >/dev/null 2>&1; then + # Only analyze coverage if the installed version of ansible-test supports it. + # Doing so allows this script to work unmodified for multiple Ansible versions. + ansible-test coverage analyze targets generate "${agent_temp_directory}/coverage/coverage-analyze-targets.json" "${options[@]}" +fi diff --git a/ansible_collections/community/rabbitmq/.azure-pipelines/scripts/combine-coverage.py b/ansible_collections/community/rabbitmq/.azure-pipelines/scripts/combine-coverage.py new file mode 100755 index 000000000..506ade646 --- /dev/null +++ b/ansible_collections/community/rabbitmq/.azure-pipelines/scripts/combine-coverage.py @@ -0,0 +1,60 @@ +#!/usr/bin/env python +""" +Combine coverage data from multiple jobs, keeping the data only from the most recent attempt from each job. +Coverage artifacts must be named using the format: "Coverage $(System.JobAttempt) {StableUniqueNameForEachJob}" +The recommended coverage artifact name format is: Coverage $(System.JobAttempt) $(System.StageDisplayName) $(System.JobDisplayName) +Keep in mind that Azure Pipelines does not enforce unique job display names (only names). +It is up to pipeline authors to avoid name collisions when deviating from the recommended format. +""" + +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + +import os +import re +import shutil +import sys + + +def main(): + """Main program entry point.""" + source_directory = sys.argv[1] + + if '/ansible_collections/' in os.getcwd(): + output_path = "tests/output" + else: + output_path = "test/results" + + destination_directory = os.path.join(output_path, 'coverage') + + if not os.path.exists(destination_directory): + os.makedirs(destination_directory) + + jobs = {} + count = 0 + + for name in os.listdir(source_directory): + match = re.search('^Coverage (?P[0-9]+) (?P