From 237f82d080282031818f561808cca6c44cec7b98 Mon Sep 17 00:00:00 2001 From: Mark Chappell Date: Fri, 16 Jul 2021 09:44:05 +0200 Subject: [PATCH 1/2] Add constraints and requirements for unit/integration tests consistent with the minimum versions of the AWS SDK we explicitly state we support --- requirements.txt | 7 ++++++- test-requirements.txt | 4 ++++ tests/integration/constraints.txt | 7 +++++++ tests/integration/requirements.txt | 5 +++++ tests/unit/constraints.txt | 7 +++++++ tests/unit/requirements.txt | 6 +++++- 6 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 tests/integration/constraints.txt create mode 100644 tests/unit/constraints.txt diff --git a/requirements.txt b/requirements.txt index 8b7f0397090..3685e404330 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,8 @@ -boto>=2.49.0 +# When updating the minimal requirements please also update +# - tests/unit/constraints.txt +# - tests/integration/constraints.txt +# - tests/integration/targets/setup_botocore_pip botocore>=1.18.0 boto3>=1.15.0 +# Final released version +boto>=2.49.0 diff --git a/test-requirements.txt b/test-requirements.txt index 1c232aebe7d..77c76b86509 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,3 +1,7 @@ +botocore +boto3 +boto + coverage==4.5.4 placebo mock diff --git a/tests/integration/constraints.txt b/tests/integration/constraints.txt new file mode 100644 index 00000000000..bd95eb26733 --- /dev/null +++ b/tests/integration/constraints.txt @@ -0,0 +1,7 @@ +# Specifically run tests against the oldest versions that we support +boto3==1.15.0 +botocore==1.18.0 + +# AWS CLI has `botocore==` dependencies, provide the one that matches botocore +# to avoid needing to download over a years worth of awscli wheels. +awscli==1.18.141 diff --git a/tests/integration/requirements.txt b/tests/integration/requirements.txt index 7d6f44d79a9..6e870975a35 100644 --- a/tests/integration/requirements.txt +++ b/tests/integration/requirements.txt @@ -1,3 +1,8 @@ +# Our code is based on the AWS SDKs +boto +boto3 +botocore + # netaddr is needed for ansible.netcommon.ipv6 netaddr virtualenv diff --git a/tests/unit/constraints.txt b/tests/unit/constraints.txt new file mode 100644 index 00000000000..bd95eb26733 --- /dev/null +++ b/tests/unit/constraints.txt @@ -0,0 +1,7 @@ +# Specifically run tests against the oldest versions that we support +boto3==1.15.0 +botocore==1.18.0 + +# AWS CLI has `botocore==` dependencies, provide the one that matches botocore +# to avoid needing to download over a years worth of awscli wheels. +awscli==1.18.141 diff --git a/tests/unit/requirements.txt b/tests/unit/requirements.txt index 4652d1014d3..704c73a25b2 100644 --- a/tests/unit/requirements.txt +++ b/tests/unit/requirements.txt @@ -1,2 +1,6 @@ -boto3>=1.15.0 +# Our code is based on the AWS SDKs +botocore +boto3 +boto + placebo From 97cf720ea7d6bc69ca5d160ed40a6d4e93a68d9f Mon Sep 17 00:00:00 2001 From: Mark Chappell Date: Fri, 17 Sep 2021 09:36:42 +0200 Subject: [PATCH 2/2] Add some hints about the duration of slow tests --- tests/integration/targets/ec2_ami/aliases | 4 +++- tests/integration/targets/ec2_instance/aliases | 2 +- tests/integration/targets/ec2_vpc_subnet/aliases | 2 -- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/integration/targets/ec2_ami/aliases b/tests/integration/targets/ec2_ami/aliases index c8e77cfa07b..9b0b03cbfa6 100644 --- a/tests/integration/targets/ec2_ami/aliases +++ b/tests/integration/targets/ec2_ami/aliases @@ -1,3 +1,5 @@ -cloud/aws +# duration: 15 slow + +cloud/aws ec2_ami_info diff --git a/tests/integration/targets/ec2_instance/aliases b/tests/integration/targets/ec2_instance/aliases index 673b5cba3f6..0a6ae9e0354 100644 --- a/tests/integration/targets/ec2_instance/aliases +++ b/tests/integration/targets/ec2_instance/aliases @@ -1,4 +1,4 @@ -# Takes about 10-15 minutes +# duration: 25 slow cloud/aws diff --git a/tests/integration/targets/ec2_vpc_subnet/aliases b/tests/integration/targets/ec2_vpc_subnet/aliases index 598d7d31199..5dcc9055ddb 100644 --- a/tests/integration/targets/ec2_vpc_subnet/aliases +++ b/tests/integration/targets/ec2_vpc_subnet/aliases @@ -1,4 +1,2 @@ -slow - cloud/aws ec2_vpc_subnet_info