diff --git a/pillar/api/file_storage/__init__.py b/pillar/api/file_storage/__init__.py index 13457afe..4fe17087 100644 --- a/pillar/api/file_storage/__init__.py +++ b/pillar/api/file_storage/__init__.py @@ -363,7 +363,7 @@ def generate_link(backend, file_path: str, project_id: str=None, is_public=False return blob.get_url(is_public=is_public) - if backend == 'pillar': + if backend == 'pillar': # obsolete, replace with local. return url_for('file_storage.index', file_name=file_path, _external=True, _scheme=current_app.config['SCHEME']) if backend == 'cdnsun': diff --git a/pillar/api/node_types/storage.py b/pillar/api/node_types/storage.py index 5a81173f..3dd2ecbb 100644 --- a/pillar/api/node_types/storage.py +++ b/pillar/api/node_types/storage.py @@ -16,7 +16,7 @@ node_type_storage = { 'subdir': { 'type': 'string', }, - # Which backend is used to store the files (gcs, pillar, bam, cdnsun) + # Which backend is used to store the files (gcs, local) 'backend': { 'type': 'string', }, diff --git a/pillar/tests/common_test_data.py b/pillar/tests/common_test_data.py index fa72e38d..fc05cdf7 100644 --- a/pillar/tests/common_test_data.py +++ b/pillar/tests/common_test_data.py @@ -38,7 +38,7 @@ EXAMPLE_FILE = {'_id': ObjectId('5672e2c1c379cf0007b31995'), '_created': datetime.datetime(2015, 12, 17, 16, 28, 49, tzinfo=tz_util.utc), 'md5': '', 'file_path': 'c2a5c897769ce1ef0eb10f8fa1c472bcb8e2d5a4.png', - 'backend': 'pillar', + 'backend': 'local', 'link': 'http://localhost:8002/file', 'link_expires': datetime.datetime(2016, 3, 22, 9, 28, 22, tzinfo=tz_util.utc)} diff --git a/tests/test_celery/test_file_link_tasks.py b/tests/test_celery/test_file_link_tasks.py index af622743..72f8c273 100644 --- a/tests/test_celery/test_file_link_tasks.py +++ b/tests/test_celery/test_file_link_tasks.py @@ -33,7 +33,7 @@ EXAMPLE_FILE = { 'user': ObjectId('56264fc4fa3a250344bd10c5'), 'content_type': 'image/png', 'file_path': 'c2a5c897769ce1ef0eb10f8fa1c472bcb8e2d5a4.png', - 'backend': 'pillar', + 'backend': 'local', 'link': 'http://localhost:8002/file', } @@ -58,7 +58,7 @@ class FileLinkCeleryTasksTest(AbstractPillarTest): 'link_expires': now + datetime.timedelta(hours=1, minutes=57)}) # Not same backend → ignore fid4, file_4 = self.ensure_file_exists({ - 'backend': 'pillar', + 'backend': 'local', 'link_expires': now + datetime.timedelta(hours=1, minutes=58)}) # Same as fid3 → refresh fid5, _ = self.ensure_file_exists({