Skip to content

Commit

Permalink
Integration test dependency cleanup (#1086)
Browse files Browse the repository at this point in the history
Integration test dependency cleanup

SUMMARY

remove dependencies on setup_remote_tmp_dir where it's not used (often just copy & paste from another test)
remove setup_ec2 (no main.yml means it's not doing anything)
remove prepare_tests (empty main.yml means it's not doing anything)

ISSUE TYPE

Feature Pull Request

COMPONENT NAME
tests/integration/targets
ADDITIONAL INFORMATION
By cleaning up what we have we reduce the chance of people copying things about "because that's what test XYZ did".

Reviewed-by: Alina Buzachis <None>
Reviewed-by: Mark Woolley <[email protected]>
  • Loading branch information
tremble authored Apr 22, 2022
1 parent 6a8a35f commit dd12046
Show file tree
Hide file tree
Showing 46 changed files with 28 additions and 221 deletions.
4 changes: 1 addition & 3 deletions tests/integration/targets/aws_api_gateway/meta/main.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
dependencies:
- prepare_tests
- setup_ec2
dependencies: []
3 changes: 1 addition & 2 deletions tests/integration/targets/aws_eks_cluster/meta/main.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
dependencies:
- setup_remote_tmp_dir
dependencies: []
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
dependencies:
- prepare_tests
- setup_ec2
dependencies: []
4 changes: 1 addition & 3 deletions tests/integration/targets/aws_kms/meta/main.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
dependencies:
- prepare_tests
- setup_ec2
dependencies: []
3 changes: 1 addition & 2 deletions tests/integration/targets/aws_msk_cluster/meta/main.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
dependencies:
- setup_remote_tmp_dir
dependencies: []
3 changes: 1 addition & 2 deletions tests/integration/targets/aws_msk_config/meta/main.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
dependencies:
- setup_remote_tmp_dir
dependencies: []
3 changes: 1 addition & 2 deletions tests/integration/targets/aws_region_info/meta/main.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
dependencies:
- setup_remote_tmp_dir
dependencies: []
1 change: 0 additions & 1 deletion tests/integration/targets/ec2_eip/meta/main.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
dependencies:
- prepare_tests
- setup_ec2_facts
3 changes: 0 additions & 3 deletions tests/integration/targets/ec2_launch_template/meta/main.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
dependencies:
- prepare_tests
- setup_ec2
- setup_ec2_facts
- setup_remote_tmp_dir
- role: setup_botocore_pip
vars:
boto3_version: "1.20.30"
2 changes: 0 additions & 2 deletions tests/integration/targets/ec2_lc/meta/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
dependencies:
- prepare_tests
- setup_ec2
- setup_ec2_facts
- role: setup_botocore_pip
vars:
Expand Down
2 changes: 0 additions & 2 deletions tests/integration/targets/ec2_metric_alarm/meta/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
dependencies:
- prepare_tests
- setup_ec2
- setup_ec2_facts
2 changes: 0 additions & 2 deletions tests/integration/targets/ec2_scaling_policy/meta/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
dependencies:
- prepare_tests
- setup_ec2
- setup_ec2_facts
4 changes: 1 addition & 3 deletions tests/integration/targets/ec2_vpc_nacl/meta/main.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
dependencies:
- prepare_tests
- setup_ec2
dependencies: []
3 changes: 1 addition & 2 deletions tests/integration/targets/ecs_cluster/meta/main.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
dependencies:
- setup_remote_tmp_dir
dependencies: []
4 changes: 1 addition & 3 deletions tests/integration/targets/ecs_ecr/meta/main.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
dependencies:
- prepare_tests
- setup_ec2
dependencies: []
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
dependencies:
- prepare_tests
- setup_ec2_facts
3 changes: 1 addition & 2 deletions tests/integration/targets/elb_application_lb/meta/main.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
dependencies:
- setup_remote_tmp_dir
dependencies: []
4 changes: 1 addition & 3 deletions tests/integration/targets/elb_classic_lb_info/meta/main.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
dependencies:
- prepare_tests
- setup_ec2
dependencies: []
2 changes: 0 additions & 2 deletions tests/integration/targets/elb_instance/meta/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
dependencies:
- prepare_tests
- setup_ec2
- setup_ec2_facts
2 changes: 0 additions & 2 deletions tests/integration/targets/elb_network_lb/meta/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
dependencies:
- prepare_tests
- setup_ec2
- setup_ec2_facts
2 changes: 0 additions & 2 deletions tests/integration/targets/elb_target/meta/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
dependencies:
- prepare_tests
- setup_ec2
- setup_ec2_facts
4 changes: 1 addition & 3 deletions tests/integration/targets/iam_access_key/meta/main.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
dependencies:
- prepare_tests
- setup_ec2
dependencies: []
4 changes: 1 addition & 3 deletions tests/integration/targets/iam_group/meta/main.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
dependencies:
- prepare_tests
- setup_ec2
dependencies: []
4 changes: 1 addition & 3 deletions tests/integration/targets/iam_role/meta/main.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
dependencies:
- prepare_tests
- setup_ec2
dependencies: []
4 changes: 1 addition & 3 deletions tests/integration/targets/iam_saml_federation/meta/main.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
dependencies:
- prepare_tests
- setup_ec2
dependencies: []
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
dependencies:
- prepare_tests
- setup_remote_tmp_dir
4 changes: 1 addition & 3 deletions tests/integration/targets/iam_user/meta/main.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
dependencies:
- prepare_tests
- setup_ec2
dependencies: []
4 changes: 1 addition & 3 deletions tests/integration/targets/kinesis_stream/meta/main.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
dependencies:
- prepare_tests
- setup_ec2
dependencies: []
4 changes: 1 addition & 3 deletions tests/integration/targets/lambda/meta/main.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
dependencies:
- prepare_tests
- setup_ec2
dependencies: []
4 changes: 1 addition & 3 deletions tests/integration/targets/lambda_alias/meta/main.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
dependencies:
- prepare_tests
- setup_ec2
dependencies: []
4 changes: 1 addition & 3 deletions tests/integration/targets/lambda_policy/meta/main.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
dependencies:
- prepare_tests
- setup_ec2
dependencies: []
Empty file.
4 changes: 1 addition & 3 deletions tests/integration/targets/rds_param_group/meta/main.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
dependencies:
- prepare_tests
- setup_ec2
dependencies: []
1 change: 0 additions & 1 deletion tests/integration/targets/rds_param_group/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
# TODO - name: test 'validate_certs' parameter

# ============================================================
# - include: ../../setup_ec2/tasks/common.yml module_name=rds_param_group

- name: rds_option_group tests
collections:
Expand Down
4 changes: 1 addition & 3 deletions tests/integration/targets/rds_subnet_group/meta/main.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
dependencies:
- prepare_tests
- setup_ec2
dependencies: []
4 changes: 1 addition & 3 deletions tests/integration/targets/redshift/meta/main.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
dependencies:
- prepare_tests
- setup_ec2
dependencies: []
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
dependencies:
- prepare_tests
- setup_ec2_facts
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
dependencies:
- prepare_tests
- setup_ec2_facts
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
dependencies:
- prepare_tests
- setup_ec2
dependencies: []
4 changes: 1 addition & 3 deletions tests/integration/targets/s3_sync/meta/main.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
dependencies:
- prepare_tests
- setup_ec2
dependencies: []
2 changes: 0 additions & 2 deletions tests/integration/targets/setup_ec2/defaults/main.yml

This file was deleted.

119 changes: 0 additions & 119 deletions tests/integration/targets/setup_ec2/tasks/common.yml

This file was deleted.

3 changes: 0 additions & 3 deletions tests/integration/targets/setup_ec2/vars/main.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
- name: create temporary directory
tempfile:
path: /var/tmp
state: directory
suffix: .test
register: remote_tmp_dir
Expand Down
4 changes: 1 addition & 3 deletions tests/integration/targets/sts_assume_role/meta/main.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
dependencies:
- prepare_tests
- setup_ec2
dependencies: []
1 change: 0 additions & 1 deletion tests/integration/targets/wafv2/meta/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
dependencies:
- setup_remote_tmp_dir
- role: setup_botocore_pip
vars:
boto3_version: "1.18.0"
Expand Down

0 comments on commit dd12046

Please sign in to comment.