From c54dda1d24f4090a3459c65714acf257aedfb370 Mon Sep 17 00:00:00 2001 From: "Michael R. Crusoe" Date: Fri, 16 Jul 2021 10:46:26 +0200 Subject: [PATCH] respect TOIL_AWS_ZONE for running the tests --- .gitlab-ci.yml | 2 +- src/toil/test/__init__.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 73b7f8c60f..ded8b97919 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -50,5 +50,5 @@ integration_us_east_1: # This reads GITLAB_SECRET_FILE_SSH_KEYS - python setup_gitlab_ssh.py - chmod 400 /root/.ssh/id_rsa - - make test tests=src/toil/test/jobStores/jobStoreTest.py + - make test tests=src/toil/test/jobStores/jobStoreTest.py::AWSJobStoreTest diff --git a/src/toil/test/__init__.py b/src/toil/test/__init__.py index 911e636c3a..18e818acdd 100644 --- a/src/toil/test/__init__.py +++ b/src/toil/test/__init__.py @@ -98,10 +98,10 @@ def tearDown(self): @classmethod def awsRegion(cls): """ - Use us-west-2 unless running on EC2, in which case use the region in which - the instance is located + Use TOIL_AWS_ZONE (if set), or "us-west-2" + unless running on EC2, in which case use the region in which the instance is located """ - return cls._region() if running_on_ec2() else 'us-west-2' + return cls._region() if running_on_ec2() else os.environ.get('TOIL_AWS_ZONE', 'us-west-2') @classmethod def _availabilityZone(cls):