Skip to content
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

Backport stable-2: Various integration test fixes (#984) #1141

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tests/integration/targets/aws_secret/tasks/rotation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
name: "{{ lambda_name }}"
state: present
zip_file: "{{ tmp.path }}/hello_world.zip"
runtime: 'python2.7'
runtime: 'python3.9'
role: "{{ iam_role_output.arn }}"
handler: 'hello_world.lambda_handler'
register: lambda_output
Expand Down Expand Up @@ -169,7 +169,7 @@
name: "{{ lambda_name }}"
state: absent
zip_file: "{{ tmp.path }}/hello_world.zip"
runtime: 'python2.7'
runtime: 'python3.9'
role: "{{ secret_manager_role }}"
handler: 'hello_world.lambda_handler'
ignore_errors: yes
Expand Down
8 changes: 4 additions & 4 deletions tests/integration/targets/lambda/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
- name: test lambda config updates
lambda:
name: '{{lambda_function_name}}'
runtime: nodejs10.x
runtime: nodejs14.x
tracing_mode: Active
handler: mini_lambda.handler
role: '{{ lambda_role_name }}'
Expand All @@ -139,13 +139,13 @@
that:
- update_result is not failed
- update_result.changed == True
- update_result.configuration.runtime == 'nodejs10.x'
- update_result.configuration.runtime == 'nodejs14.x'
- update_result.configuration.tracing_config.mode == 'Active'

- name: test no changes are made with the same parameters repeated
lambda:
name: '{{lambda_function_name}}'
runtime: nodejs10.x
runtime: nodejs14.x
tracing_mode: Active
handler: mini_lambda.handler
role: '{{ lambda_role_name }}'
Expand All @@ -159,7 +159,7 @@
that:
- update_result is not failed
- update_result.changed == False
- update_result.configuration.runtime == 'nodejs10.x'
- update_result.configuration.runtime == 'nodejs14.x'
- update_result.configuration.tracing_config.mode == 'Active'

- name: reset config updates for the following tests
Expand Down
6 changes: 3 additions & 3 deletions tests/integration/targets/lambda_alias/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
- name: Upload test lambda (version 1)
lambda:
name: '{{ lambda_function_name }}'
runtime: 'python2.7'
runtime: 'python3.7'
handler: 'mini_lambda.handler'
role: '{{ lambda_role_name }}'
zip_file: '{{ zip_res.dest }}'
Expand All @@ -50,7 +50,7 @@
- name: Update lambda (version 2)
lambda:
name: '{{ lambda_function_name }}'
runtime: 'python3.6'
runtime: 'python3.8'
handler: 'mini_lambda.handler'
role: '{{ lambda_role_name }}'
register: lambda_b
Expand All @@ -62,7 +62,7 @@
- name: Update lambda (version 3 / LATEST)
lambda:
name: '{{ lambda_function_name }}'
runtime: 'python3.7'
runtime: 'python3.9'
handler: 'mini_lambda.handler'
role: '{{ lambda_role_name }}'
register: lambda_c
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/targets/lambda_policy/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
- name: test state=present - upload the lambda
lambda:
name: '{{lambda_function_name}}'
runtime: python2.7
runtime: python3.9
handler: mini_http_lambda.handler
role: '{{ lambda_role_name }}'
zip_file: '{{zip_res.dest}}'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,13 @@
- "result.tags.Name == '{{ instance_id }}-new'"

always:
- name: remove final snapshot
rds_instance_snapshot:
db_snapshot_identifier: "{{ instance_id }}"
state: absent
wait: false
ignore_errors: yes

- name: Remove DB instance
rds_instance:
id: "{{ instance_id }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@
prefix: images/
suffix: .jpg
register: result
retries: 3
delay: 3
until:
- result is successful
- name: assert result.changed == True
assert:
that:
Expand Down
2 changes: 2 additions & 0 deletions tests/integration/targets/wafv2/aliases
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
cloud/aws
# reason: Tests broken - https://github.com/ansible-collections/community.aws/issues/985
disabled

wafv2_resources
wafv2_resources_info
Expand Down
10 changes: 5 additions & 5 deletions tests/integration/targets/wafv2/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
web_acl_name: '{{ resource_prefix }}-web-acl'
rule_group_name: '{{ resource_prefix }}-rule-group'
alb_name: "my-alb-{{ resource_prefix | regex_search('([0-9]+)$') }}"
tg_name: "my-tg-{{ resource_prefix | regex_search('([0-9]+)$') }}"
web_acl_name: '{{ tiny_prefix }}-web-acl'
rule_group_name: '{{ tiny_prefix }}-rule-group'
alb_name: "my-alb-{{ tiny_prefix }}"
tg_name: "my-tg-{{ tiny_prefix }}"
cidr:
main: 10.228.228.0/22
a: 10.228.228.0/24
b: 10.228.229.0/24
c: 10.228.230.0/24
d: 10.228.231.0/24
d: 10.228.231.0/24