Skip to content

Commit

Permalink
[Asset] Test: fix bucket clean up logic. (#1845)
Browse files Browse the repository at this point in the history
  • Loading branch information
peter-zheng-g authored and gguuss committed Nov 16, 2018
1 parent 5272268 commit 859dd86
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions asset/cloud-client/quickstart_exportassets_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,16 @@ def storage_client():

@pytest.fixture(scope='module')
def asset_bucket(storage_client):
storage_client.create_bucket(BUCKET)
bucket = storage_client.create_bucket(BUCKET)

yield BUCKET

try:
storage_client.delete_bucket(BUCKET)
bucket.delete(force=True)
except Exception as e:
print('Failed to delete bucket{}'.format(BUCKET))
raise e

yield BUCKET


def test_export_assets(asset_bucket, capsys):
dump_file_path = 'gs://{}/assets-dump.txt'.format(asset_bucket)
Expand Down

0 comments on commit 859dd86

Please sign in to comment.