Skip to content

Commit

Permalink
Fix integration tests trying to install *old* botocore versions (ansi…
Browse files Browse the repository at this point in the history
…ble-collections#1792)

Fix integration tests trying to install *old* botocore versions

SUMMARY
Some integration tests are trying to install an old copy of botocore, which conflicts with our minimum boto3 requirement.  Drop the installation, we now require botocore >= 1.25.0
ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME
dynamodb_table
networkfirewall_policy
s3_lifecycl
ADDITIONAL INFORMATION

Reviewed-by: Alina Buzachis
  • Loading branch information
tremble authored Apr 25, 2023
1 parent 0b8dfc5 commit 8c5f87b
Show file tree
Hide file tree
Showing 10 changed files with 7 additions and 45 deletions.
4 changes: 4 additions & 0 deletions changelogs/fragments/botocore-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
trivial:
- s3_lifecycle - drop custom botocore installation for tests
- dynamodb_table - drop custom botocore installation for tests
- networkfirewall_policy - drop custom botocore installation for tests
5 changes: 1 addition & 4 deletions tests/integration/targets/dynamodb_table/meta/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
dependencies:
- role: setup_botocore_pip
vars:
botocore_version: "1.23.18"
dependencies: []
12 changes: 0 additions & 12 deletions tests/integration/targets/dynamodb_table/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -588,8 +588,6 @@
tags: "{{ tags_default }}"
indexes: "{{ indexes }}"
register: create_complex_table
vars:
ansible_python_interpreter: "{{ botocore_virtualenv_interpreter }}"
check_mode: True

- name: Check results - Create complex table - check_mode
Expand All @@ -612,8 +610,6 @@
tags: "{{ tags_default }}"
indexes: "{{ indexes }}"
register: create_complex_table
vars:
ansible_python_interpreter: "{{ botocore_virtualenv_interpreter }}"

- name: Check results - Create complex table
assert:
Expand Down Expand Up @@ -656,8 +652,6 @@
tags: "{{ tags_default }}"
indexes: "{{ indexes }}"
register: create_complex_table
vars:
ansible_python_interpreter: "{{ botocore_virtualenv_interpreter }}"
check_mode: True

- name: Check results - Create complex table - idempotent - check_mode
Expand All @@ -680,8 +674,6 @@
tags: "{{ tags_default }}"
indexes: "{{ indexes }}"
register: create_complex_table
vars:
ansible_python_interpreter: "{{ botocore_virtualenv_interpreter }}"

- name: Check results - Create complex table - idempotent
assert:
Expand Down Expand Up @@ -719,8 +711,6 @@
name: "{{ table_name }}"
table_class: "STANDARD"
register: update_class
vars:
ansible_python_interpreter: "{{ botocore_virtualenv_interpreter }}"
check_mode: True

- name: Check results - Update table class - check_mode
Expand All @@ -734,8 +724,6 @@
state: present
name: "{{ table_name }}"
table_class: "STANDARD"
vars:
ansible_python_interpreter: "{{ botocore_virtualenv_interpreter }}"
register: update_class

- name: Check results - Update table class
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
dependencies:
- role: setup_botocore_pip
vars:
botocore_version: "1.23.23"
dependencies: []
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,6 @@
stateful_rule_order: strict
register: default_policy
ignore_errors: True
vars:
ansible_python_interpreter: "{{ botocore_virtualenv_interpreter }}"

- assert:
that:
Expand All @@ -237,8 +235,6 @@
stateful_rule_order: strict
register: default_policy
ignore_errors: True
vars:
ansible_python_interpreter: "{{ botocore_virtualenv_interpreter }}"

- assert:
that:
Expand Down Expand Up @@ -1143,8 +1139,6 @@
- 'aws:drop_strict'
register: default_policy
ignore_errors: True
vars:
ansible_python_interpreter: "{{ botocore_virtualenv_interpreter }}"

- assert:
that:
Expand All @@ -1158,8 +1152,6 @@
- 'aws:drop_strict'
register: default_policy
ignore_errors: True
vars:
ansible_python_interpreter: "{{ botocore_virtualenv_interpreter }}"

- assert:
that:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@

# Tests specifically related to policies using 'strict' rule order
- include_tasks: 'strict_order.yml'
vars:
ansible_python_interpreter: "{{ botocore_virtualenv_interpreter }}"

- include_tasks: 'actions.yml'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@
rule_order: strict
register: strict_groups
loop: '{{ range(1,4,1) | list }}'
# Setting rule order requires botocore>=1.23.23
vars:
ansible_python_interpreter: "{{ botocore_virtualenv_interpreter }}"

- debug:
var: default_groups
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,8 +260,6 @@
stateful_rule_order: default
register: strict_policy
ignore_errors: True
vars:
ansible_python_interpreter: "{{ botocore_virtualenv_interpreter }}"

- assert:
that:
Expand All @@ -274,8 +272,6 @@
stateful_rule_order: default
register: strict_policy
ignore_errors: True
vars:
ansible_python_interpreter: "{{ botocore_virtualenv_interpreter }}"

- assert:
that:
Expand Down
5 changes: 1 addition & 4 deletions tests/integration/targets/s3_lifecycle/meta/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
dependencies:
- role: setup_botocore_pip
vars:
botocore_version: "1.23.12"
dependencies: []
4 changes: 0 additions & 4 deletions tests/integration/targets/s3_lifecycle/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -465,8 +465,6 @@
noncurrent_version_keep_newer: 6
prefix: /something
register: output
vars:
ansible_python_interpreter: "{{ botocore_virtualenv_interpreter }}"

- assert:
that:
Expand All @@ -479,8 +477,6 @@
noncurrent_version_keep_newer: 6
prefix: /something
register: output
vars:
ansible_python_interpreter: "{{ botocore_virtualenv_interpreter }}"

- assert:
that:
Expand Down

0 comments on commit 8c5f87b

Please sign in to comment.