Commit 1a66c641 authored by Samuel GAIST's avatar Samuel GAIST
Browse files

[database] Add property to check if raw data access is enabled

parent 164bf684
......@@ -247,3 +247,12 @@ class Database(BackendDatabase):
if self.schema_version != 1:
for view in protocol["views"].keys():
def is_database_rawdata_access_enabled(self):
"""Returns whether raw data sharing was enabled
This property is only useful for the Docker executor.
return"direct_rawdata_access", False)
......@@ -61,3 +61,22 @@ def export(db_name):
# load from tmp_prefix and validates
exported = Database(tmp_prefix, db_name), "\n * %s" % "\n * ".join(exported.errors))
def test_rawdata_access():
for i in range(1, 3):
yield rawdata_access, f"integers_db/{i}", False
yield rawdata_access, f"simple/{i}", False
yield rawdata_access, f"large/{i}", False
yield rawdata_access, f"simple_rawdata_access/{i}", True
def rawdata_access(db_name, rawdata_access_enabled):
obj = Database(prefix, db_name), "\n * %s" % "\n * ".join(obj.errors))
obj.is_database_rawdata_access_enabled, rawdata_access_enabled
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment