Skip to content

Commit 1977907

Browse files
Rename storage setup (#484)
1 parent c1d20b5 commit 1977907

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

gen3-integration-tests/services/gen3workflow.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,9 @@ def _perform_s3_action(
143143
##### /storage endpoint #####
144144
#############################
145145

146-
def get_storage_info(self, user: str = "main_account", expected_status=200) -> Dict:
147-
"""Makes a GET request to the `/storage/info` endpoint."""
148-
storage_url = f"{self.BASE_URL}{self.SERVICE_URL}/storage/info"
146+
def setup_storage(self, user: str = "main_account", expected_status=200) -> Dict:
147+
"""Makes a GET request to the `/storage/setup` endpoint."""
148+
storage_url = f"{self.BASE_URL}{self.SERVICE_URL}/storage/setup"
149149
headers = (
150150
{
151151
"Authorization": f"bearer {self._get_access_token(user)}",

gen3-integration-tests/tests/test_gen3_workflow.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ def _nextflow_parse_completed_line(log_line):
6262
return task_info
6363

6464

65-
@pytest.mark.skip(reason="Until https://github.com/uc-cdis/gen3-code-vigil/pull/484 is merged")
6665
@pytest.mark.skipif(
6766
"funnel" not in pytest.deployed_services,
6867
reason="funnel service is not running on this environment",
@@ -80,18 +79,20 @@ def setup_class(cls):
8079
cls.invalid_user = "dummy_one"
8180
cls.s3_folder_name = "integration-tests"
8281
cls.s3_file_name = "test-input.txt"
83-
# Ensure the bucket is emptied before running the tests
84-
cls.gen3_workflow.cleanup_user_bucket()
8582

8683
cls.s3_storage_config = WorkflowStorageConfig.from_dict(
87-
cls.gen3_workflow.get_storage_info(user=cls.valid_user, expected_status=200)
84+
cls.gen3_workflow.setup_storage(user=cls.valid_user, expected_status=200)
8885
)
8986

90-
######################## Test /storage/info endpoint ########################
87+
# Ensure the bucket is emptied before running the tests (must run after
88+
# `storage_setup` so the user has access to empty the bucket)
89+
cls.gen3_workflow.cleanup_user_bucket()
90+
91+
######################## Test /storage/setup endpoint ########################
9192

92-
def test_get_storage_info_without_token(self):
93-
"""Test GET /storage/info without an access token."""
94-
self.gen3_workflow.get_storage_info(user=None, expected_status=401)
93+
def test_setup_storage_without_token(self):
94+
"""Test GET /storage/setup without an access token."""
95+
self.gen3_workflow.setup_storage(user=None, expected_status=401)
9596

9697
######################## Test /s3/ endpoint ########################
9798

0 commit comments

Comments
 (0)