From e532aba6fa1f5d014f911d39e4bb9ec8a10d7271 Mon Sep 17 00:00:00 2001 From: Ruslan Kuprieiev Date: Mon, 8 Jan 2018 15:21:23 +0200 Subject: [PATCH] test: use unique aws s3 repo name I've setup a cleanup rule on s3 to remove old files, so there is no need them up manualy. Fixes #374 Signed-off-by: Ruslan Kuprieiev --- tests/test_data_cloud.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/test_data_cloud.py b/tests/test_data_cloud.py index dbc292031..4cd41ddc2 100644 --- a/tests/test_data_cloud.py +++ b/tests/test_data_cloud.py @@ -1,4 +1,5 @@ import os +import uuid from dvc.config import ConfigError from dvc.data_cloud import DataCloud, DataCloudAWS, DataCloudLOCAL @@ -64,7 +65,7 @@ class TestDataCloudBase(TestDvc): class TestDataCloudAWS(TestDataCloudBase): - TEST_REPO_S3 = 'dvc-test/myrepo' + TEST_REPO_BUCKET = 'dvc-test' TEST_REPO_REGION = 'us-east-2' def _should_test(self): @@ -77,11 +78,10 @@ class TestDataCloudAWS(TestDataCloudBase): if not self._should_test(): return - # Cleanup - os.system('aws s3 rm --recursive "s3://{}/"'.format(self.TEST_REPO_S3)) + repo = self.TEST_REPO_BUCKET + '/' + str(uuid.uuid4()) # Setup cloud - config = {'StoragePath': self.TEST_REPO_S3, + config = {'StoragePath': repo, 'Region': self.TEST_REPO_REGION} cloud_settings = CloudSettings(None, config) self.cloud = DataCloudAWS(cloud_settings)