summaryrefslogtreecommitdiffstats
path: root/ansible_collections/community/aws/tests/integration/targets
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-26 04:06:02 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-26 04:06:02 +0000
commite3eb94c23206603103f3c4faec6c227f59a1544c (patch)
treef2639459807ba88f55fc9c54d745bd7075d7f15c /ansible_collections/community/aws/tests/integration/targets
parentReleasing progress-linux version 9.4.0+dfsg-1~progress7.99u1. (diff)
downloadansible-e3eb94c23206603103f3c4faec6c227f59a1544c.tar.xz
ansible-e3eb94c23206603103f3c4faec6c227f59a1544c.zip
Merging upstream version 9.5.1+dfsg.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'ansible_collections/community/aws/tests/integration/targets')
-rw-r--r--ansible_collections/community/aws/tests/integration/targets/dynamodb_table/tasks/main.yml21
-rw-r--r--ansible_collections/community/aws/tests/integration/targets/dynamodb_table/tasks/test_pay_per_request.yml52
-rw-r--r--ansible_collections/community/aws/tests/integration/targets/elb_target/tasks/lambda_target.yml2
-rw-r--r--ansible_collections/community/aws/tests/integration/targets/s3_bucket_notification/tasks/test_lambda_notifications.yml2
-rw-r--r--ansible_collections/community/aws/tests/integration/targets/secretsmanager_secret/tasks/rotation.yml4
-rw-r--r--ansible_collections/community/aws/tests/integration/targets/sns_topic/tasks/main.yml2
6 files changed, 78 insertions, 5 deletions
diff --git a/ansible_collections/community/aws/tests/integration/targets/dynamodb_table/tasks/main.yml b/ansible_collections/community/aws/tests/integration/targets/dynamodb_table/tasks/main.yml
index 268e61bae..5b3592f30 100644
--- a/ansible_collections/community/aws/tests/integration/targets/dynamodb_table/tasks/main.yml
+++ b/ansible_collections/community/aws/tests/integration/targets/dynamodb_table/tasks/main.yml
@@ -30,6 +30,16 @@
that:
- create_table is successful
- create_table is changed
+
+ - name: Ensure the table was not created
+ dynamodb_table_info:
+ name: "{{ table_name }}"
+ register: table_info
+
+ - name: Assert the table was not created
+ assert:
+ that:
+ - not table_info.table
- name: Create table
dynamodb_table:
@@ -65,6 +75,17 @@
- create_table.table_name == table_name
- create_table.write_capacity == 1
+ - name: Ensure the table was created
+ dynamodb_table_info:
+ name: "{{ table_name }}"
+ register: table_info
+
+ - name: Assert the table was created
+ assert:
+ that:
+ - table_info.table
+ - 'table_info.table.attribute_definitions == [{"attribute_name": table_index, "attribute_type": table_index_type[0]}]'
+
- name: Create table - idempotent - check_mode
dynamodb_table:
state: present
diff --git a/ansible_collections/community/aws/tests/integration/targets/dynamodb_table/tasks/test_pay_per_request.yml b/ansible_collections/community/aws/tests/integration/targets/dynamodb_table/tasks/test_pay_per_request.yml
index b469a1b51..301d22c06 100644
--- a/ansible_collections/community/aws/tests/integration/targets/dynamodb_table/tasks/test_pay_per_request.yml
+++ b/ansible_collections/community/aws/tests/integration/targets/dynamodb_table/tasks/test_pay_per_request.yml
@@ -15,6 +15,16 @@
- create_table is successful
- create_table is changed
+- name: Ensure the table was not created
+ dynamodb_table_info:
+ name: "{{ table_name_on_demand }}"
+ register: _table
+
+- name: Assert the table does not exist
+ assert:
+ that:
+ - not _table.table
+
- name: Create table - pay-per-request
dynamodb_table:
state: present
@@ -32,6 +42,17 @@
- create_table is changed
- create_table.billing_mode == "PAY_PER_REQUEST"
+- name: Ensure the table was created
+ dynamodb_table_info:
+ name: "{{ table_name_on_demand }}"
+ register: _table
+
+- name: Assert the table has been created with the expected billing mode
+ assert:
+ that:
+ - _table.table
+ - _table.table.billing_mode == 'PAY_PER_REQUEST'
+
- name: Create table - pay-per-request - check failure
dynamodb_table:
state: present
@@ -71,6 +92,16 @@
- create_complex_table is successful
- create_complex_table is changed
+- name: Ensure the table was not created
+ dynamodb_table_info:
+ name: "{{ table_name_on_demand_complex }}"
+ register: _complex_table
+
+- name: Assert the table does not exist
+ assert:
+ that:
+ - not _complex_table.table
+
- name: Create complex table - check failure on index
dynamodb_table:
state: present
@@ -120,6 +151,17 @@
- create_complex_table.table_name == table_name_on_demand_complex
- create_complex_table.tags == tags_default
+- name: Ensure the table was created
+ dynamodb_table_info:
+ name: "{{ table_name_on_demand_complex }}"
+ register: _complex_table
+
+- name: Assert the table has been created
+ assert:
+ that:
+ - _complex_table.table
+ - _complex_table.table.billing_mode == 'PAY_PER_REQUEST'
+
- name: Update complex table billing_mode
dynamodb_table:
state: present
@@ -140,3 +182,13 @@
- convert_complex_table is changed
- '"billing_mode" in convert_complex_table'
- convert_complex_table.billing_mode == "PROVISIONED"
+
+- name: Read table info
+ dynamodb_table_info:
+ name: "{{ table_name_on_demand_complex }}"
+ register: _complex_table
+
+- name: Assert the table has been updated
+ assert:
+ that:
+ - _complex_table.table.billing_mode == 'PROVISIONED'
diff --git a/ansible_collections/community/aws/tests/integration/targets/elb_target/tasks/lambda_target.yml b/ansible_collections/community/aws/tests/integration/targets/elb_target/tasks/lambda_target.yml
index abc4cc5d0..c4271cdd6 100644
--- a/ansible_collections/community/aws/tests/integration/targets/elb_target/tasks/lambda_target.yml
+++ b/ansible_collections/community/aws/tests/integration/targets/elb_target/tasks/lambda_target.yml
@@ -23,7 +23,7 @@
name: "{{ lambda_name }}"
state: present
zip_file: /tmp/lambda.zip
- runtime: python3.7
+ runtime: python3.12
role: "{{ ROLE_ARN.arn }}"
handler: ansible_lambda_target.lambda_handler
timeout: 30
diff --git a/ansible_collections/community/aws/tests/integration/targets/s3_bucket_notification/tasks/test_lambda_notifications.yml b/ansible_collections/community/aws/tests/integration/targets/s3_bucket_notification/tasks/test_lambda_notifications.yml
index 23ed32e32..b4cc8a6e0 100644
--- a/ansible_collections/community/aws/tests/integration/targets/s3_bucket_notification/tasks/test_lambda_notifications.yml
+++ b/ansible_collections/community/aws/tests/integration/targets/s3_bucket_notification/tasks/test_lambda_notifications.yml
@@ -41,7 +41,7 @@
name: '{{ lambda_name }}'
state: present
role: "{{ lambda_role_name }}"
- runtime: python3.7
+ runtime: python3.12
zip_file: '{{function_res.dest}}'
handler: lambda_function.lambda_handler
memory_size: '128'
diff --git a/ansible_collections/community/aws/tests/integration/targets/secretsmanager_secret/tasks/rotation.yml b/ansible_collections/community/aws/tests/integration/targets/secretsmanager_secret/tasks/rotation.yml
index 697c5ecc2..77151227d 100644
--- a/ansible_collections/community/aws/tests/integration/targets/secretsmanager_secret/tasks/rotation.yml
+++ b/ansible_collections/community/aws/tests/integration/targets/secretsmanager_secret/tasks/rotation.yml
@@ -55,7 +55,7 @@
name: "{{ lambda_name }}"
state: present
zip_file: "{{ tmp.path }}/hello_world.zip"
- runtime: 'python3.9'
+ runtime: 'python3.12'
role: "{{ iam_role_output.arn }}"
handler: 'hello_world.lambda_handler'
register: lambda_output
@@ -169,7 +169,7 @@
name: "{{ lambda_name }}"
state: absent
zip_file: "{{ tmp.path }}/hello_world.zip"
- runtime: 'python3.9'
+ runtime: 'python3.12'
role: "{{ secret_manager_role }}"
handler: 'hello_world.lambda_handler'
ignore_errors: yes
diff --git a/ansible_collections/community/aws/tests/integration/targets/sns_topic/tasks/main.yml b/ansible_collections/community/aws/tests/integration/targets/sns_topic/tasks/main.yml
index 00f3f71d9..25f636832 100644
--- a/ansible_collections/community/aws/tests/integration/targets/sns_topic/tasks/main.yml
+++ b/ansible_collections/community/aws/tests/integration/targets/sns_topic/tasks/main.yml
@@ -309,7 +309,7 @@
name: '{{ sns_topic_lambda_name }}'
state: present
zip_file: '{{ tempdir.path }}/{{ sns_topic_lambda_function }}.zip'
- runtime: python3.9
+ runtime: python3.12
role: '{{ sns_topic_lambda_role }}'
handler: '{{ sns_topic_lambda_function }}.handler'
register: lambda_result