diff --git a/integrationtests/test_data/extroot/realworld_example/dataset_cfoods.yml b/integrationtests/test_data/extroot/realworld_example/dataset_cfoods.yml index e149c0ccc0008a20d96ee782a853d345d541f3ab..117d190b6474b63657b285632886a2af218071a5 100644 --- a/integrationtests/test_data/extroot/realworld_example/dataset_cfoods.yml +++ b/integrationtests/test_data/extroot/realworld_example/dataset_cfoods.yml @@ -31,11 +31,6 @@ Data: type: JSONFile match: .dataspace.json validate: schema/dataspace.schema.json - records: - JSONFile: - role: File - path: $dataspace_json - file: $dataspace_json subtree: jsondict: type: DictElement @@ -158,6 +153,13 @@ Data: metadata_json: &metadata_json_template type: JSONFile match: metadata.json + records: + JSONFile: + parents: + - JSONFile + role: File + path: $metadata_json_path + file: $metadata_json_path validate: schema/dataset.schema.json subtree: jsondict: diff --git a/integrationtests/test_data/extroot/realworld_example/schema/dataspace.schema.json b/integrationtests/test_data/extroot/realworld_example/schema/dataspace.schema.json index c6376ee44d248ce5ea9e24e34bd245255e888e39..36233230ae05f9df58ae4e492ff1f709322f6e51 100644 --- a/integrationtests/test_data/extroot/realworld_example/schema/dataspace.schema.json +++ b/integrationtests/test_data/extroot/realworld_example/schema/dataspace.schema.json @@ -9,7 +9,7 @@ "minimum": 20000 }, "archived": { "type": "boolean" }, - "JSONFile": { "type": "string" }, + "JSONFile": { "type": "object" }, "url": { "type": "string", "description": "link to folder on file system (CaosDB or cloud folder)" diff --git a/integrationtests/test_realworld_example.py b/integrationtests/test_realworld_example.py index 5542596e2751a5de8a34a9e19628266e8c753ad3..4e3b349cdb8c83a2ab612c812f26e9e45c1516df 100644 --- a/integrationtests/test_realworld_example.py +++ b/integrationtests/test_realworld_example.py @@ -107,7 +107,8 @@ def test_dataset(clear_database, usemodel, addfiles): True, os.path.join(DATADIR, "provenance.yml"), 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 " @@ -140,7 +141,8 @@ def test_event_update(clear_database, usemodel, addfiles): True, os.path.join(DATADIR, "provenance.yml"), False, - add_prefix="/data" + remove_prefix=DATADIR, + add_prefix="/extroot/realworld_example" ) old_dataset_rec = db.execute_query(