Skip to content
Snippets Groups Projects
Commit f9ae5c03 authored by Henrik tom Wörden's avatar Henrik tom Wörden
Browse files

TST: add file to test entities

parent c1a52e34
No related branches found
No related tags found
2 merge requests!105REL: v0.4.0,!101ENH: add the 'add_prefix' argument
Pipeline #33840 failed
This commit is part of merge request !101. Comments created here will be created in the context of that merge request.
...@@ -31,11 +31,6 @@ Data: ...@@ -31,11 +31,6 @@ Data:
type: JSONFile type: JSONFile
match: .dataspace.json match: .dataspace.json
validate: schema/dataspace.schema.json validate: schema/dataspace.schema.json
records:
JSONFile:
role: File
path: $dataspace_json
file: $dataspace_json
subtree: subtree:
jsondict: jsondict:
type: DictElement type: DictElement
...@@ -158,6 +153,13 @@ Data: ...@@ -158,6 +153,13 @@ Data:
metadata_json: &metadata_json_template metadata_json: &metadata_json_template
type: JSONFile type: JSONFile
match: metadata.json match: metadata.json
records:
JSONFile:
parents:
- JSONFile
role: File
path: $metadata_json_path
file: $metadata_json_path
validate: schema/dataset.schema.json validate: schema/dataset.schema.json
subtree: subtree:
jsondict: jsondict:
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
"minimum": 20000 "minimum": 20000
}, },
"archived": { "type": "boolean" }, "archived": { "type": "boolean" },
"JSONFile": { "type": "string" }, "JSONFile": { "type": "object" },
"url": { "url": {
"type": "string", "type": "string",
"description": "link to folder on file system (CaosDB or cloud folder)" "description": "link to folder on file system (CaosDB or cloud folder)"
......
...@@ -107,7 +107,8 @@ def test_dataset(clear_database, usemodel, addfiles): ...@@ -107,7 +107,8 @@ def test_dataset(clear_database, usemodel, addfiles):
True, True,
os.path.join(DATADIR, "provenance.yml"), os.path.join(DATADIR, "provenance.yml"),
False, False,
add_prefix="/data" remove_prefix=DATADIR,
add_prefix="/extroot/realworld_example"
) )
dataspace = db.execute_query("FIND RECORD Dataspace WITH name=35 AND dataspace_id=20002 AND " dataspace = db.execute_query("FIND RECORD Dataspace WITH name=35 AND dataspace_id=20002 AND "
...@@ -140,7 +141,8 @@ def test_event_update(clear_database, usemodel, addfiles): ...@@ -140,7 +141,8 @@ def test_event_update(clear_database, usemodel, addfiles):
True, True,
os.path.join(DATADIR, "provenance.yml"), os.path.join(DATADIR, "provenance.yml"),
False, False,
add_prefix="/data" remove_prefix=DATADIR,
add_prefix="/extroot/realworld_example"
) )
old_dataset_rec = db.execute_query( old_dataset_rec = db.execute_query(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment