Skip to content

Commit

Permalink
fix: rename teardown fixture (#1004)
Browse files Browse the repository at this point in the history
  • Loading branch information
morgandu authored Feb 7, 2022
1 parent e0fec36 commit fcd0096
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion tests/system/aiplatform/e2e_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,13 @@ def delete_bigquery_dataset(self, shared_state: Dict[str, Any]):
) # Make an API request.

@pytest.fixture(scope="class", autouse=True)
def teardown(self, shared_state: Dict[str, Any]):
def tear_down_resources(self, shared_state: Dict[str, Any]):
"""Delete every Vertex AI resource created during test"""

yield

# TODO(b/218310362): Add resource deletion system tests

# Bring all Endpoints to the front of the list
# Ensures Models are undeployed first before we attempt deletion
shared_state["resources"].sort(
Expand Down
2 changes: 1 addition & 1 deletion tests/system/aiplatform/test_e2e_tabular.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
}


@pytest.mark.usefixtures("prepare_staging_bucket", "delete_staging_bucket", "teardown")
@pytest.mark.usefixtures("prepare_staging_bucket", "delete_staging_bucket")
class TestEndToEndTabular(e2e_base.TestEndToEnd):
"""End to end system test of the Vertex SDK with tabular data adapted from
reference notebook http://shortn/_eyoNx3SN0X"""
Expand Down
2 changes: 1 addition & 1 deletion tests/system/aiplatform/test_model_upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
_XGBOOST_MODEL_URI = "gs://cloud-samples-data-us-central1/vertex-ai/google-cloud-aiplatform-ci-artifacts/models/iris_xgboost/model.bst"


@pytest.mark.usefixtures("delete_staging_bucket", "teardown")
@pytest.mark.usefixtures("delete_staging_bucket")
class TestModel(e2e_base.TestEndToEnd):
_temp_prefix = f"{_TEST_PROJECT}-vertex-staging-{_TEST_LOCATION}"

Expand Down

0 comments on commit fcd0096

Please sign in to comment.