Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion test/integration/dss/test_dss_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ class TestDssApi(unittest.TestCase):

@classmethod
def setUpClass(cls):
cls.client = hca.dss.DSSClient()
# Explicitly set to dss-integration rather than what the local config is set to.
# Ensures no bundles are uploaded to dss-prod from operators machine.
cls.client = hca.dss.DSSClient(swagger_url="https://dss.integration.data.humancellatlas.org/v1/swagger.json")

def test_set_host(self):
with tempfile.TemporaryDirectory() as home:
Expand Down
6 changes: 5 additions & 1 deletion test/integration/dss/test_dss_api_retry.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ class TestDssApiRetry(unittest.TestCase):

@classmethod
def setUpClass(cls):
# Explicitly set to dss-integration rather than what the local config is set to.
# Ensures no bundles are uploaded to dss-prod from operators machine.
cls.client = hca.dss.DSSClient(swagger_url="https://dss.integration.data.humancellatlas.org/v1/swagger.json")

with tempfile.TemporaryDirectory() as src_dir:
bundle_path = os.path.join(src_dir, "bundle")
os.makedirs(bundle_path)
Expand All @@ -49,7 +53,7 @@ def test_get_retry(self):
Test that GET methods are retried. We instruct the server to fake a 504 with some probability, and we should
retry until successful.
"""
client = hca.dss.DSSClient()
client = self.client
file_uuid = str(uuid.uuid4())
creator_uid = client.config.get("creator_uid", 0)
version = datetime.utcnow().strftime("%Y-%m-%dT%H%M%S.%fZ")
Expand Down
10 changes: 10 additions & 0 deletions test/integration/dss/test_dss_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,16 @@


class TestDssCLI(unittest.TestCase):
@classmethod
def setUpClass(cls):
"""
These tests rely on a logged in env, ensure that the current stage is not dss-prod
"""
config = hca.get_config()
if "https://dss.data.humancellatlas.org" in config['DSSClient']['swagger_url']:
raise ValueError('Please change the DSS swagger endpoint in the HCA config file away from `dss-prod`\n'
'For more information see: `https://github.com/HumanCellAtlas/dcp-cli#development`')

def test_post_search_cli(self):
query = json.dumps({})
replica = "aws"
Expand Down