Skip to content

Commit

Permalink
respect TOIL_AWS_ZONE for running the tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-c committed Jul 16, 2021
1 parent c061c43 commit d76754f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

9 changes: 6 additions & 3 deletions src/toil/test/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,13 @@ 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
If TOIL_AWS_ZONE is set, use that.
Else use "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 os.environ.get(
"TOIL_AWS_ZONE", cls._region() if running_on_ec2() else "us-west-2"
)

@classmethod
def _availabilityZone(cls):
Expand Down

0 comments on commit d76754f

Please sign in to comment.