Skip to content

Commit

Permalink
Drop compile/import tests for old versions of python in sanity tests (#…
Browse files Browse the repository at this point in the history
…447)

Drop compile/import tests for old versions of python in sanity tests

SUMMARY
We don't support Python < 3.6, so drop the tests at the Zuul job level rather than with a large number of !skip entries
ISSUE TYPE

Feature request

COMPONENT NAME
sanity tests
ADDITIONAL INFORMATION
Depends-On: ansible/ansible-zuul-jobs#1028

Reviewed-by: Alina Buzachis <None>
Reviewed-by: None <None>
  • Loading branch information
tremble authored Aug 11, 2021
1 parent 37cd338 commit 5876c14
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 1,559 deletions.
5 changes: 4 additions & 1 deletion tests/integration/targets/ec2_vol/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
ec2_ami_name: 'amzn2-ami-hvm-2.*-x86_64-gp2'

vpc_name: '{{ resource_prefix }}-vpc'
vpc_seed: '{{ resource_prefix }}'
vpc_cidr: '10.{{ 256 | random(seed=vpc_seed) }}.0.0/16'
subnet_cidr: '10.{{ 256 | random(seed=vpc_seed) }}.32.0/24'
ec2_ami_name: 'amzn2-ami-hvm-2.*-x86_64-gp2'

instance_name: '{{ resource_prefix }}-instance'
5 changes: 0 additions & 5 deletions tests/integration/targets/ec2_vol/main.yml

This file was deleted.

25 changes: 12 additions & 13 deletions tests/integration/targets/ec2_vol/tasks/tests.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
---

- module_defaults:
group/aws:
aws_access_key: '{{ aws_access_key | default(omit) }}'
aws_secret_key: '{{ aws_secret_key | default(omit) }}'
security_token: '{{ security_token | default(omit) }}'
region: '{{ aws_region | default(omit) }}'

collections:
- amazon.aws
- community.aws
Expand Down Expand Up @@ -104,7 +103,7 @@
- volume2.volume_type == 'io1'
- volume2.volume.iops == 101
- volume2.volume.size == 4
- volume2.volume.tags.Name == "{{ resource_prefix }}"
- volume2.volume.tags.Name == "{{ resource_prefix }}"
- volume2.volume.encrypted
- volume2.volume.tags.ResourcePrefix == "{{ resource_prefix }}"

Expand Down Expand Up @@ -157,7 +156,7 @@

- name: create an ec2 instance
ec2_instance:
name: "{{ resource_prefix }}"
name: "{{ instance_name }}"
vpc_subnet_id: "{{ testing_subnet.subnet.id }}"
instance_type: t3.nano
image_id: "{{ ec2_ami_image }}"
Expand Down Expand Up @@ -231,7 +230,7 @@
- new_vol_attach_result.volume.tags["Title Case"] == 'Hello Cruel World'
- new_vol_attach_result.volume.tags["CamelCase"] == 'SimpleCamelCase'
- new_vol_attach_result.volume.tags["snake_case"] == 'simple_snake_case'
- new_vol_attach_result.volume.tags["Name"] == '{{ resource_prefix }} - sdh'
- new_vol_attach_result.volume.tags["Name"] == '{{ resource_prefix }} - sdh'


- name: attach a new volume to an instance (idempotent)
Expand Down Expand Up @@ -451,7 +450,7 @@
- name: volume type must be gp3
assert:
that:
- v.type == 'gp3'
- v.type == 'gp3'
vars:
v: "{{ verify_gp3_change.volumes[0] }}"

Expand Down Expand Up @@ -492,7 +491,7 @@
Tag Name with Space-and-dash: Tag Value with Space-and-dash
delete_on_termination: yes
register: dot_volume

- name: check task return attributes
assert:
that:
Expand Down Expand Up @@ -651,7 +650,7 @@
- gp3_volume.volume.iops == 3001
- "'throughput' in gp3_volume.volume"
- gp3_volume.volume.throughput == 131

# Multi-Attach disk
- name: create disk with multi-attach enabled
ec2_vol:
Expand All @@ -663,25 +662,25 @@
tags:
ResourcePrefix: "{{ resource_prefix }}"
register: multi_attach_disk

- name: check volume creation
assert:
that:
- multi_attach_disk.changed
- "'volume' in multi_attach_disk"
- multi_attach_disk.volume.multi_attach_enabled

- name: attach existing volume to an instance
ec2_vol:
id: "{{ multi_attach_disk.volume_id }}"
instance: "{{ test_instance.instance_ids[0] }}"
device_name: /dev/sdk
delete_on_termination: no
register: vol_attach_result

- name: create another ec2 instance
ec2_instance:
name: "{{ resource_prefix }}-2"
name: "{{ instance_name }}-2"
vpc_subnet_id: "{{ testing_subnet.subnet.id }}"
instance_type: t3.nano
image_id: "{{ ec2_ami_image }}"
Expand All @@ -693,7 +692,7 @@
assert:
that:
- test_instance_2.changed

- name: attach existing volume to second instance
ec2_vol:
id: "{{ multi_attach_disk.volume_id }}"
Expand Down
Loading

0 comments on commit 5876c14

Please sign in to comment.