From e479197302189ffc98fbd35a5c1933f7c96a00e0 Mon Sep 17 00:00:00 2001 From: Stefan Kasberger Date: Sun, 12 Jun 2022 01:12:37 +0200 Subject: [PATCH] add dataverse 5.6, 5.7 and 4.18.1 --- configs/default/dataverse_4-18-1/xpaths.json | 27 + .../form-data_create-dataset.json | 43 - .../default/dataverse_5-7/terms-of-use.html | 1 + configs/default/dataverse_5-7/xpaths.json | 27 + .../TEMPLATE_testing-settings.json | 7 + .../utils/create_testdata_01.json | 313 +-- .../utils/create_testdata_02.json | 73 +- .../utils/create_testdata_01.json | 1671 +++++++++-------- env-config/example.env | 3 +- setup.cfg | 1 + src/dvtests/settings.py | 2 - src/dvtests/testing/conftest.py | 3 +- src/dvtests/testing/default/test_api.py | 2 + .../testing/default/test_installation.py | 3 + src/dvtests/testing/default/test_oaipmh.py | 2 + .../testing/default/test_registration.py | 1 + .../testing/default/test_robots_txt.py | 2 + src/dvtests/testing/default/test_search.py | 2 + src/dvtests/utils/__init__.py | 11 +- 19 files changed, 1135 insertions(+), 1059 deletions(-) create mode 100644 configs/default/dataverse_4-18-1/xpaths.json delete mode 100644 configs/default/dataverse_5-6/form-data_create-dataset.json create mode 100644 configs/default/dataverse_5-7/terms-of-use.html create mode 100644 configs/default/dataverse_5-7/xpaths.json create mode 100644 configs/installations/TEMPLATE_testing-settings.json diff --git a/configs/default/dataverse_4-18-1/xpaths.json b/configs/default/dataverse_4-18-1/xpaths.json new file mode 100644 index 0000000..1b984a9 --- /dev/null +++ b/configs/default/dataverse_4-18-1/xpaths.json @@ -0,0 +1,27 @@ +{ + "navbar-user-display-info-title": "//span[@id='userDisplayInfoTitle']", + "login-username-email-input": "//input[@id='loginForm:credentialsContainer:0:credValue']", + "login-password-input": "//input[@id='loginForm:credentialsContainer:1:sCredValue']", + "login-button-login": "//button[@id='loginForm:login']", + "login-button-login-normal": "//*[text()='Username/Email']", + "login-institution-select": "//select[@id='idpSelectSelector']", + "login-institution-select-button": "//input[@id='idpSelectListButton']", + "register-div-terms-of-use": "//div[@id='terms-agreement-block']", + "search-navbar-link": "//ul[contains(@class, 'navbar-nav')]/li/a[text()='Search ']", + "search-navbar-input": "//input[@id='navbarsearch']", + "search-header-input": "//input[contains(@class, 'search-input')]", + "search-sidebar-result": "//input[@id='j_idt414:searchBasic']", + "create-dataverse-button-save": "//button[@id='dataverseForm:save']", + "create-dataverse-note-alert-success": "//div[contains(@class, 'alert-success')]", + "create-dataverse-note-alert-success-text": "//div[contains(@class, 'alert-success')]/strong[text()='Success!']", + "dataverse-header-unpublished": "//span[contains(@class, 'label-unpublished')]", + "dataverse-header-name": "//a[contains(@class, 'dataverseHeaderDataverseName')]", + "dataverse-header-affiliation": "//div[contains(@class, 'dataverseHeaderName')]/span[1]", + "datafile-header-title": "//span[@class='file-title-label']", + "add-data-button": "//form[@id='addDataForm']/div[1]/button", + "add-data-button-dataverse": "//form[@id='addDataForm']/div[1]/ul/li[1]/a", + "sidebar-facet-dataverse": "//span[@class='facetTypeDataverse']", + "sidebar-facet-dataset": "//span[@class='facetTypeDataset']", + "sidebar-facet-datafile": "//span[@class='facetTypeFile']", + "div-sidebar": "//div[@id='dv-sidebar']" +} diff --git a/configs/default/dataverse_5-6/form-data_create-dataset.json b/configs/default/dataverse_5-6/form-data_create-dataset.json deleted file mode 100644 index 9e792f0..0000000 --- a/configs/default/dataverse_5-6/form-data_create-dataset.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "title": { - "form-type": "", - "xpath": "//div[@aria-labelledby='metadata_title']/div/div/div/div/div/div/input[contains(@class, 'datasetfield-title')]" - }, - "subject": { - "form-type": "checkbox", - "xpath": "" - }, - "datasetContact": { - "form-type": "add-item", - "xpath": "", - "input": { - "xpath": "" - }, - "add-item": { - "xpath": "" - }, - "metadata-child-name": "" - }, - "author": { - "form-type": "add-item", - "xpath": "", - "input": { - "xpath": "" - }, - "add-item": { - "xpath": "" - }, - "metadata-child-name": "" - }, - "dsDescription": { - "form-type": "add-item", - "xpath": "", - "input": { - "xpath": "" - }, - "add-item": { - "xpath": "" - }, - "metadata-child-name": "" - } -} diff --git a/configs/default/dataverse_5-7/terms-of-use.html b/configs/default/dataverse_5-7/terms-of-use.html new file mode 100644 index 0000000..8a9140b --- /dev/null +++ b/configs/default/dataverse_5-7/terms-of-use.html @@ -0,0 +1 @@ +There are no Terms of Use for this Dataverse installation. diff --git a/configs/default/dataverse_5-7/xpaths.json b/configs/default/dataverse_5-7/xpaths.json new file mode 100644 index 0000000..a898792 --- /dev/null +++ b/configs/default/dataverse_5-7/xpaths.json @@ -0,0 +1,27 @@ +{ + "navbar-user-display-info-title": "//span[@id='userDisplayInfoTitle']", + "datafile-header-title": "//span[@class='file-title-label']", + "input-username-email": "//input[@id='loginForm:credentialsContainer:0:credValue']", + "input-password": "//input[@id='loginForm:credentialsContainer:1:sCredValue']", + "login-button-login": "//button[@id='loginForm:login']", + "login-button-login-normal": "//*[text()='Username/Email']", + "login-institution-select": "//select[@id='idpSelectSelector']", + "login-institution-select-button": "//input[@id='idpSelectListButton']", + "register-div-terms-of-use": "//div[contains(@class, 'terms-agreement-block')]", + "search-navbar-link": "//ul[contains(@class, 'navbar-nav')]/li/a[text()='Search ']", + "search-navbar-input": "//input[@id='navbarsearch']", + "search-header-input": "//input[contains(@class, 'search-input')]", + "search-sidebar-result": "//input[@id='j_idt443:searchBasic']", + "create-dataverse-button-save": "//button[@id='dataverseForm:save']", + "create-dataverse-note-alert-success": "//div[contains(@class, 'alert-success')]", + "create-dataverse-note-alert-success-text": "//div[contains(@class, 'alert-success')]/strong[text()='Success!']", + "dataverse-header-unpublished": "//span[contains(@class, 'label-unpublished')]", + "dataverse-header-name": "//a[contains(@class, 'dataverseHeaderDataverseName')]", + "dataverse-header-affiliation": "//div[contains(@class, 'dataverseHeaderName')]/span[1]", + "add-data-button": "//form[@id='addDataForm']/div[1]/button", + "add-data-button-dataverse": "//form[@id='addDataForm']/div[1]/ul/li[1]/a", + "sidebar-facet-dataverse": "//span[@class='facetTypeDataverse']", + "sidebar-facet-dataset": "//span[@class='facetTypeDataset']", + "sidebar-facet-datafile": "//span[@class='facetTypeFile']", + "div-sidebar": "//div[@id='dv-sidebar']" +} diff --git a/configs/installations/TEMPLATE_testing-settings.json b/configs/installations/TEMPLATE_testing-settings.json new file mode 100644 index 0000000..557f345 --- /dev/null +++ b/configs/installations/TEMPLATE_testing-settings.json @@ -0,0 +1,7 @@ +{ + "login-options": [ + "normal", + "shibboleth" + ], + "cookie-rollbar": true +} diff --git a/configs/installations/aussda_production/utils/create_testdata_01.json b/configs/installations/aussda_production/utils/create_testdata_01.json index 1db18b2..08b580d 100644 --- a/configs/installations/aussda_production/utils/create_testdata_01.json +++ b/configs/installations/aussda_production/utils/create_testdata_01.json @@ -1,225 +1,104 @@ -{ - "dataverses": [ - { - "create": { - "user-handle": "dataverseAdmin", - "metadata-filename": "dataverse_testdata/metadata/json/dataverse/dataverse_upload_full_01.json", - "parent": ":root", - "update": { - "alias": "test_create_testdata", - "name": "Test Create Testdata" - } - }, - "publish": { - "user-handle": "dataverseAdmin" - } - }, - { - "create": { - "user-handle": "dataverseAdmin", - "metadata-filename": "dataverse_testdata/metadata/json/dataverse/dataverse_upload_full_01.json", - "parent": "test_create_testdata" - }, - "publish": { - "user-handle": "dataverseAdmin" +[ + { + "data-type": "dataverse", + "action": "create", + "parent-id": ":root", + "parent-type": "alias", + "user-handle": "dataverseAdmin", + "metadata": { + "filename": "dataverse_testdata/metadata/json/dataverse/dataverse_upload_full_01.json", + "update": { + "alias": "test_create_testdata", + "name": "Test Create Testdata" } } - ], - "datasets": [ - { - "id": 0, - "create": { - "user-handle": "dataverseAdmin", - "metadata-filename": "dataverse_testdata/metadata/json/dataset/dataset_upload_default_full_01.json", - "parent": "test_create_testdata" - }, - "publish": { - "user-handle": "dataverseAdmin" - } - }, - { - "id": 1, - "create": { - "user-handle": "dataverseAdmin", - "metadata-filename": "dataverse_testdata/metadata/json/dataset/dataset_upload_default_min_01.json", - "parent": "DataverseName1" - }, - "publish": { - "user-handle": "dataverseAdmin" + }, + { + "data-type": "dataverse", + "action": "create", + "parent-id": "test_create_testdata", + "parent-type": "alias", + "user-handle": "dataverseAdmin", + "metadata": { + "filename": "dataverse_testdata/metadata/json/dataverse/dataverse_upload_full_01.json", + "update": { + "alias": "DataverseName1", + "name": "Dataverse Name 1" } } - ], - "datafiles": { - "0": [ - { - "upload": { - "user-handle": "dataverseAdmin", - "metadata-filename": "dataverse_testdata/metadata/json/datafile/datafile_upload_full_01.json", - "filename": "dataverse_testdata/files/jpeg/10000_image.jpeg", - "update": { - "filename": "10000_image.jpeg" - } - }, - "publish-dataset": { - "user-handle": "dataverseAdmin" - } - }, - { - "upload": { - "user-handle": "dataverseAdmin", - "metadata-filename": "dataverse_testdata/metadata/json/datafile/datafile_upload_min_01.json", - "filename": "dataverse_testdata/files/png/10000_image.png", - "update": { - "filename": "10000_image.png" - } - }, - "publish-dataset": { - "user-handle": "dataverseAdmin" - } - } - ], - "1": [ - { - "upload": { - "user-handle": "dataverseAdmin", - "metadata-filename": "dataverse_testdata/metadata/json/datafile/datafile_upload_min_01.json", - "filename": "dataverse_testdata/files/do/10002_data_checks.do", - "update": { - "filename": "10002_data_checks.do" - } - }, - "publish-dataset": { - "user-handle": "dataverseAdmin" - } - }, - { - "upload": { - "user-handle": "dataverseAdmin", - "metadata-filename": "dataverse_testdata/metadata/json/datafile/datafile_upload_full_01.json", - "filename": "dataverse_testdata/files/dta/10002_da_de_v0_9.dta", - "update": { - "filename": "10002_da_de_v0_9.dta" - } - }, - "publish-dataset": { - "user-handle": "dataverseAdmin" - } - } - ] }, - "users": [ - { - "create": { - "filename": "dataverse_testdata/metadata/json/user/user_01.json", - "update": { - "alias": "", - "name": "" - } - } - }, - { - "create": { - "filename": "dataverse_testdata/metadata/json/user/user_01.json", - "update": { - "email": "ContactEmail2@mailinator.com", - "firstName": "FirstName2", - "lastName": "LastName2", - "userName": "UserName2", - "affiliation": "Affiliation2", - "position": "Position2" - } - } - }, - { - "create": { - "filename": "dataverse_testdata/metadata/json/user/user_01.json", - "update": { - "email": "ContactEmail3@mailinator.com", - "firstName": "FirstName3", - "lastName": "LastName3", - "userName": "UserName3", - "affiliation": "Affiliation3", - "position": "Position3" - } - } - }, - { - "create": { - "filename": "dataverse_testdata/metadata/json/user/user_01.json", - "update": { - "email": "ContactEmail4@mailinator.com", - "firstName": "FirstName4", - "lastName": "LastName4", - "userName": "UserName4", - "affiliation": "Affiliation4", - "position": "Position4" - } - } - }, - { - "create": { - "filename": "dataverse_testdata/metadata/json/user/user_01.json", - "update": { - "email": "ContactEmail5@mailinator.com", - "firstName": "FirstName5", - "lastName": "LastName5", - "userName": "UserName5", - "affiliation": "Affiliation5", - "position": "Position5" - } - } - }, - { - "create": { - "filename": "dataverse_testdata/metadata/json/user/user_01.json", - "update": { - "email": "ContactEmail6@mailinator.com", - "firstName": "FirstName6", - "lastName": "LastName6", - "userName": "UserName6", - "affiliation": "Affiliation6", - "position": "Position6" - } - } - }, - { - "create": { - "filename": "dataverse_testdata/metadata/json/user/user_01.json", - "update": { - "email": "ContactEmail7@mailinator.com", - "firstName": "FirstName7", - "lastName": "LastName7", - "userName": "UserName7", - "affiliation": "Affiliation7", - "position": "Position7" - } - } + { + "id": "full-1", + "data-type": "dataset", + "action": "create", + "metadata": { + "filename": "dataverse_testdata/metadata/json/dataset/dataset_upload_default_full_01.json" }, - { - "create": { - "filename": "dataverse_testdata/metadata/json/user/user_01.json", - "update": { - "email": "ContactEmail8@mailinator.com", - "firstName": "FirstName8", - "lastName": "LastName8", - "userName": "UserName8", - "affiliation": "Affiliation8", - "position": "Position8" - } - } + "parent-id": "test_create_testdata", + "parent-type": "alias", + "user-handle": "dataverseAdmin" + }, + { + "id": "min-1", + "data-type": "dataset", + "action": "create", + "metadata": { + "filename": "dataverse_testdata/metadata/json/dataset/dataset_upload_default_min_01.json" }, - { - "create": { - "filename": "dataverse_testdata/metadata/json/user/user_01.json", - "update": { - "email": "ContactEmail9@mailinator.com", - "firstName": "FirstName9", - "lastName": "LastName9", - "userName": "UserName9", - "affiliation": "Affiliation9", - "position": "Position9" - } - } + "parent-id": "DataverseName1", + "parent-type": "alias", + "user-handle": "dataverseAdmin" + }, + { + "data-type": "datafile", + "action": "upload", + "filename": "dataverse_testdata/files/jpeg/10000_image.jpeg", + "metadata-filename": "dataverse_testdata/metadata/json/datafile/datafile_upload_full_01.json", + "id-type": "dvtests", + "parent-id": "full-1", + "parent-type": "dataset", + "user-handle": "dataverseAdmin", + "update": { + "filename": "10000_image.jpeg" + } + }, + { + "data-type": "datafile", + "action": "upload", + "metadata-filename": "dataverse_testdata/metadata/json/datafile/datafile_upload_min_01.json", + "filename": "dataverse_testdata/files/png/10000_image.png", + "id-type": "dvtests", + "parent-id": "full-1", + "parent-type": "dataset", + "user-handle": "dataverseAdmin", + "update": { + "filename": "10000_image.png" + } + }, + { + "data-type": "datafile", + "action": "upload", + "metadata-filename": "dataverse_testdata/metadata/json/datafile/datafile_upload_min_01.json", + "filename": "dataverse_testdata/files/do/10002_data_checks.do", + "id-type": "dvtests", + "parent-id": "min-1", + "parent-type": "dataset", + "user-handle": "dataverseAdmin", + "update": { + "filename": "10002_data_checks.do" + } + }, + { + "data-type": "datafile", + "action": "upload", + "metadata-filename": "dataverse_testdata/metadata/json/datafile/datafile_upload_full_01.json", + "filename": "dataverse_testdata/files/dta/10002_da_de_v0_9.dta", + "id-type": "dvtests", + "parent-id": "min-1", + "parent-type": "dataset", + "user-handle": "dataverseAdmin", + "update": { + "filename": "10002_da_de_v0_9.dta" } - ] -} + } +] diff --git a/configs/installations/aussda_production/utils/create_testdata_02.json b/configs/installations/aussda_production/utils/create_testdata_02.json index 0742b4b..a51b08a 100644 --- a/configs/installations/aussda_production/utils/create_testdata_02.json +++ b/configs/installations/aussda_production/utils/create_testdata_02.json @@ -1,39 +1,40 @@ -{ - "dataverses": [ - { - "create": { - "metadata-filename": "dataverse_testdata/metadata/json/dataverse/dataverse_upload_full_01.json", - "parent": ":root", - "update": { - "alias": "test_create_testdata", - "name": "Test Create Testdata" - } - }, - "publish": {} +[ + { + "data-type": "dataverse", + "action": "create", + "parent-id": ":root", + "parent-type": "alias", + "user-handle": "dataverseAdmin", + "metadata": { + "filename": "dataverse_testdata/metadata/json/dataverse/dataverse_upload_full_01.json", + "update": { + "alias": "test_create_testdata", + "name": "Test Create Testdata" + } } - ], - "datasets": [ - { - "id": 0, - "create": { - "metadata-filename": "dataverse_testdata/metadata/json/dataset/dataset_upload_default_full_01.json", - "parent": "test_create_testdata" - }, - "publish": {} + }, + { + "id": "full-1", + "data-type": "dataset", + "action": "create", + "metadata": { + "filename": "dataverse_testdata/metadata/json/dataset/dataset_upload_default_full_01.json" + }, + "parent-id": "test_create_testdata", + "parent-type": "alias", + "user-handle": "dataverseAdmin" + }, + { + "data-type": "datafile", + "action": "upload", + "filename": "dataverse_testdata/files/jpeg/10000_image.jpeg", + "metadata-filename": "dataverse_testdata/metadata/json/datafile/datafile_upload_full_01.json", + "id-type": "dvtests", + "parent-id": "full-1", + "parent-type": "dataset", + "user-handle": "dataverseAdmin", + "update": { + "filename": "10000_image.jpeg" } - ], - "datafiles": { - "0": [ - { - "upload": { - "metadata-filename": "dataverse_testdata/metadata/json/datafile/datafile_upload_full_01.json", - "filename": "dataverse_testdata/files/jpeg/10000_image.jpeg", - "update": { - "filename": "10000_image.jpeg" - } - }, - "publish-dataset": {} - } - ] } -} +] diff --git a/configs/installations/iqss_development/utils/create_testdata_01.json b/configs/installations/iqss_development/utils/create_testdata_01.json index ac8c0e9..409f732 100644 --- a/configs/installations/iqss_development/utils/create_testdata_01.json +++ b/configs/installations/iqss_development/utils/create_testdata_01.json @@ -1,756 +1,921 @@ -{ - "dataverses": [ - { - "create": { - "user-handle": "dataverseAdmin", - "metadata-filename": "dataverse_testdata/metadata/json/dataverse/dataverse_upload_full_01.json", - "parent": ":root", - "update": { - "alias": "test_create_testdata", - "name": "Test Create Testdata" - } - }, - "publish": { - "user-handle": "dataverseAdmin" - } - }, - { - "create": { - "user-handle": "dataverseAdmin", - "metadata-filename": "dataverse-sample-data/data/dataverses/dataverseno/dataverseno.json", - "parent": "test_create_testdata" - }, - "publish": { - "user-handle": "dataverseAdmin" - } - }, - { - "create": { - "user-handle": "dataverseAdmin", - "metadata-filename": "dataverse-sample-data/data/dataverses/king/king.json", - "parent": "test_create_testdata" - }, - "publish": { - "user-handle": "dataverseAdmin" - } - }, - { - "create": { - "user-handle": "dataverseAdmin", - "metadata-filename": "dataverse-sample-data/data/dataverses/ubiquity-press/ubiquity-press.json", - "parent": "test_create_testdata" - }, - "publish": { - "user-handle": "dataverseAdmin" - } - }, - { - "create": { - "user-handle": "dataverseAdmin", - "metadata-filename": "dataverse-sample-data/data/dataverses/ubiquity-press/dataverses/jopd/jopd.json", - "parent": "test_create_testdata" - }, - "publish": { - "user-handle": "dataverseAdmin" - } - }, - { - "create": { - "user-handle": "dataverseAdmin", - "metadata-filename": "dataverse-sample-data/data/dataverses/scholcommlab/scholcommlab.json", - "parent": "test_create_testdata" - }, - "publish": { - "user-handle": "dataverseAdmin" - } - }, - { - "create": { - "user-handle": "dataverseAdmin", - "metadata-filename": "dataverse-sample-data/data/dataverses/open-source-at-harvard/dataverses/dataverse-project/dataverse-project.json", - "parent": "test_create_testdata" - }, - "publish": { - "user-handle": "dataverseAdmin" - } - }, - { - "create": { - "user-handle": "dataverseAdmin", - "metadata-filename": "dataverse-sample-data/data/dataverses/ecastro/datasets/this-is-my-test-dataset/this-is-my-test-dataset.json", - "parent": "test_create_testdata" - }, - "publish": { - "user-handle": "dataverseAdmin" - } - }, - { - "create": { - "user-handle": "dataverseAdmin", - "metadata-filename": "dataverse-sample-data/data/dataverses/HCPDS/HCPDS.json", - "parent": "test_create_testdata" - }, - "publish": { - "user-handle": "dataverseAdmin" - } - }, - { - "create": { - "user-handle": "dataverseAdmin", - "metadata-filename": "dataverse-sample-data/data/dataverses/cms/cms.json", - "parent": "test_create_testdata" - }, - "publish": { - "user-handle": "dataverseAdmin" - } - }, - { - "create": { - "user-handle": "dataverseAdmin", - "metadata-filename": "dataverse-sample-data/data/dataverses/manchester/manchester.json", - "parent": "test_create_testdata" - }, - "publish": { - "user-handle": "dataverseAdmin" - } +[ + { + "id": "full-1", + "data-type": "dataverse", + "action": "create", + "metadata": { + "filename": "dataverse_testdata/metadata/json/dataverse/dataverse_metadata.json" + }, + "parent-id": ":root", + "parent-type": "alias", + "id-type": "dvtests", + "user-handle": "dataverseAdmin" + }, + { + "id": "full-1", + "id-type": "alias", + "data-type": "dataverse", + "action": "publish", + "user-handle": "dataverseAdmin" + }, + { + "id": "dataverseno", + "data-type": "dataverse", + "action": "create", + "metadata": { + "filename": "dataverse-sample-data/data/dataverses/dataverseno/dataverseno.json" + }, + "parent-id": "test_create_testdata", + "parent-type": "alias", + "user-handle": "dataverseAdmin" + }, + { + "id": "dataverseno", + "id-type": "alias", + "data-type": "dataverse", + "action": "publish", + "user-handle": "dataverseAdmin" + }, + { + "id": "king", + "data-type": "dataverse", + "action": "create", + "metadata": { + "filename": "dataverse-sample-data/data/dataverses/king/king.json" + }, + "parent-id": "test_create_testdata", + "parent-type": "alias", + "user-handle": "dataverseAdmin" + }, + { + "id": "king", + "id-type": "alias", + "data-type": "dataverse", + "action": "publish", + "user-handle": "dataverseAdmin" + }, + { + "id": "ubiquity-press", + "data-type": "dataverse", + "action": "create", + "metadata": { + "filename": "dataverse-sample-data/data/dataverses/ubiquity-press/ubiquity-press.json" + }, + "parent-id": "test_create_testdata", + "parent-type": "alias", + "user-handle": "dataverseAdmin" + }, + { + "id": "ubiquity-press", + "id-type": "alias", + "data-type": "dataverse", + "action": "publish", + "user-handle": "dataverseAdmin" + }, + { + "id": "jopd", + "data-type": "dataverse", + "action": "create", + "metadata": { + "filename": "dataverse-sample-data/data/dataverses/ubiquity-press/dataverses/jopd/jopd.json" + }, + "parent-id": "test_create_testdata", + "parent-type": "alias", + "user-handle": "dataverseAdmin" + }, + { + "id": "jopd", + "id-type": "alias", + "data-type": "dataverse", + "action": "publish", + "user-handle": "dataverseAdmin" + }, + { + "id": "scholcommlab", + "data-type": "dataverse", + "action": "create", + "metadata": { + "filename": "dataverse-sample-data/data/dataverses/scholcommlab/scholcommlab.json" + }, + "parent-id": "test_create_testdata", + "parent-type": "alias", + "user-handle": "dataverseAdmin" + }, + { + "id": "scholcommlab", + "id-type": "alias", + "data-type": "dataverse", + "action": "publish", + "user-handle": "dataverseAdmin" + }, + { + "id": "iqss", + "data-type": "dataverse", + "action": "create", + "metadata": { + "filename": "dataverse-sample-data/data/dataverses/open-source-at-harvard/dataverses/dataverse-project/dataverse-project.json" + }, + "parent-id": "test_create_testdata", + "parent-type": "alias", + "user-handle": "dataverseAdmin" + }, + { + "id": "iqss", + "id-type": "alias", + "data-type": "dataverse", + "action": "publish", + "user-handle": "dataverseAdmin" + }, + { + "id": "ecastro", + "data-type": "dataverse", + "action": "create", + "metadata": { + "filename": "dataverse-sample-data/data/dataverses/ecastro/datasets/this-is-my-test-dataset/this-is-my-test-dataset.json" + }, + "parent-id": "test_create_testdata", + "parent-type": "alias", + "user-handle": "dataverseAdmin" + }, + { + "id": "ecastro", + "id-type": "alias", + "data-type": "dataverse", + "action": "publish", + "user-handle": "dataverseAdmin" + }, + { + "id": "hcpds", + "data-type": "dataverse", + "action": "create", + "metadata": { + "filename": "dataverse-sample-data/data/dataverses/HCPDS/HCPDS.json" + }, + "parent-id": "test_create_testdata", + "parent-type": "alias", + "user-handle": "dataverseAdmin" + }, + { + "id": "hcpds", + "id-type": "alias", + "data-type": "dataverse", + "action": "publish", + "user-handle": "dataverseAdmin" + }, + { + "id": "cms", + "data-type": "dataverse", + "action": "create", + "metadata": { + "filename": "dataverse-sample-data/data/dataverses/cms/cms.json" + }, + "parent-id": "test_create_testdata", + "parent-type": "alias", + "user-handle": "dataverseAdmin" + }, + { + "id": "cms", + "id-type": "alias", + "data-type": "dataverse", + "action": "publish", + "user-handle": "dataverseAdmin" + }, + { + "id": "manchester", + "data-type": "dataverse", + "action": "create", + "metadata": { + "filename": "dataverse-sample-data/data/dataverses/manchester/manchester.json" + }, + "parent-id": "test_create_testdata", + "parent-type": "alias", + "user-handle": "dataverseAdmin" + }, + { + "id": "manchester", + "id-type": "alias", + "data-type": "dataverse", + "action": "publish", + "user-handle": "dataverseAdmin" + }, + { + "id": "irc", + "data-type": "dataset", + "action": "create", + "parent-id": "test_create_testdata", + "parent-type": "alias", + "user-handle": "dataverseAdmin", + "metadata": { + "filename": "dataverse-sample-data/data/dataverses/open-source-at-harvard/dataverses/dataverse-project/datasets/dataverse-irc-metrics/dataverse-irc-metrics.json" + } + }, + { + "id": "reproductive-health-laws", + "data-type": "dataset", + "action": "create", + "parent-id": "test_create_testdata", + "parent-type": "alias", + "user-handle": "dataverseAdmin", + "metadata": { + "filename": "dataverse-sample-data/data/dataverses/HCPDS/datasets/reproductive-health-laws-around-the-world/reproductive-health-laws-around-the-world.json" + } + }, + { + "id": "best", + "data-type": "dataset", + "action": "create", + "parent-id": "test_create_testdata", + "parent-type": "alias", + "user-handle": "dataverseAdmin", + "metadata": { + "filename": "dataverse-sample-data/data/dataverses/ecastro/datasets/this-is-my-test-dataset/this-is-my-test-dataset.json" + } + }, + { + "id": "cms", + "data-type": "dataset", + "action": "create", + "parent-id": "test_create_testdata", + "parent-type": "alias", + "user-handle": "dataverseAdmin", + "metadata": { + "filename": "dataverse-sample-data/data/dataverses/cms/datasets/cmssampledata/cmssampledata.json" + } + }, + { + "id": "diabeticconnect-1", + "data-type": "dataset", + "action": "create", + "parent-id": "test_create_testdata", + "parent-type": "alias", + "user-handle": "dataverseAdmin", + "metadata": { + "filename": "dataverse-sample-data/data/dataverses/scholcommlab/datasets/diabeticconnect/diabeticconnect.json" + } + }, + { + "id": "flynn-effect", + "data-type": "dataset", + "action": "create", + "parent-id": "test_create_testdata", + "parent-type": "alias", + "user-handle": "dataverseAdmin", + "metadata": { + "filename": "dataverse-sample-data/data/dataverses/ubiquity-press/dataverses/jopd/datasets/flynn-effect-in-estonia/flynn-effect-in-estonia.json" + } + }, + { + "id": "bafacalo", + "data-type": "dataset", + "action": "create", + "parent-id": "test_create_testdata", + "parent-type": "alias", + "user-handle": "dataverseAdmin", + "metadata": { + "filename": "dataverse-sample-data/data/dataverses/ubiquity-press/dataverses/jopd/datasets/bafacalo/bafacalo.json" + } + }, + { + "id": "open-source", + "data-type": "dataset", + "action": "create", + "parent-id": "test_create_testdata", + "parent-type": "alias", + "user-handle": "dataverseAdmin", + "metadata": { + "filename": "dataverse-sample-data/data/dataverses/open-source-at-harvard/datasets/open-source-at-harvard/open-source-at-harvard.json" + } + }, + { + "id": "death", + "data-type": "dataset", + "action": "create", + "parent-id": "test_create_testdata", + "parent-type": "alias", + "user-handle": "dataverseAdmin", + "metadata": { + "filename": "dataverse-sample-data/data/dataverses/king/datasets/cause-of-death/cause-of-death.json" + } + }, + { + "id": "test", + "data-type": "dataset", + "action": "create", + "parent-id": "test_create_testdata", + "parent-type": "alias", + "user-handle": "dataverseAdmin", + "metadata": { + "filename": "dataverse-sample-data/data/dataverses/manchester/datasets/test-dataset/test-dataset.json" + } + }, + { + "id": "tabular", + "data-type": "dataset", + "action": "create", + "parent-id": "test_create_testdata", + "parent-type": "alias", + "user-handle": "dataverseAdmin", + "metadata": { + "filename": "dataverse-sample-data/data/dataverses/dataverseno/datasets/tabular-sample-data/tabular-sample-data.json" + } + }, + { + "id": "diabeticconnect-2", + "data-type": "dataset", + "action": "create", + "parent-id": "test_create_testdata", + "parent-type": "alias", + "user-handle": "dataverseAdmin", + "metadata": { + "filename": "dataverse-sample-data/data/dataverses/scholcommlab/datasets/diabeticconnect/diabeticconnect.json" + } + }, + { + "metadata": { + "filename": "dataverse-sample-data/data/dataverses/HCPDS/datasets/reproductive-health-laws-around-the-world/files/Chrysanthemum.jpg" + }, + "data-type": "datafile", + "action": "upload", + "id-type": "dvtests", + "parent-id": "hcpds", + "parent-type": "dataset", + "user-handle": "dataverseAdmin" + }, + { + "metadata": { + "filename": "dataverse-sample-data/data/dataverses/HCPDS/datasets/reproductive-health-laws-around-the-world/files/Desert.jpg" + }, + "data-type": "datafile", + "action": "upload", + "id-type": "dvtests", + "parent-id": "hcpds", + "parent-type": "dataset", + "user-handle": "dataverseAdmin" + }, + { + "metadata": { + "filename": "dataverse-sample-data/data/dataverses/HCPDS/datasets/reproductive-health-laws-around-the-world/files/gss.dta" + }, + "data-type": "datafile", + "action": "upload", + "id-type": "dvtests", + "parent-id": "hcpds", + "parent-type": "dataset", + "user-handle": "dataverseAdmin" + }, + { + "metadata": { + "filename": "dataverse-sample-data/data/dataverses/ecastro/datasets/this-is-my-test-dataset/files/DatasetDiagram.png" + }, + "data-type": "datafile", + "action": "upload", + "id-type": "dvtests", + "parent-id": "ecastro", + "parent-type": "dataset", + "user-handle": "dataverseAdmin" + }, + { + "metadata": { + "filename": "dataverse-sample-data/data/dataverses/ecastro/datasets/this-is-my-test-dataset/files/L.fits" + }, + "data-type": "datafile", + "action": "upload", + "id-type": "dvtests", + "parent-id": "ecastro", + "parent-type": "dataset", + "user-handle": "dataverseAdmin" + }, + { + "metadata": { + "filename": "dataverse-sample-data/data/dataverses/ecastro/datasets/this-is-my-test-dataset/files/L_over_M.fits" + }, + "data-type": "datafile", + "action": "upload", + "id-type": "dvtests", + "parent-id": "ecastro", + "parent-type": "dataset", + "user-handle": "dataverseAdmin" + }, + { + "metadata": { + "filename": "dataverse-sample-data/data/dataverses/ecastro/datasets/this-is-my-test-dataset/files/M.fits" + }, + "data-type": "datafile", + "action": "upload", + "id-type": "dvtests", + "parent-id": "ecastro", + "parent-type": "dataset", + "user-handle": "dataverseAdmin" + }, + { + "metadata": { + "filename": "dataverse-sample-data/data/dataverses/ecastro/datasets/this-is-my-test-dataset/files/M_err.fits" + }, + "data-type": "datafile", + "action": "upload", + "id-type": "dvtests", + "parent-id": "ecastro", + "parent-type": "dataset", + "user-handle": "dataverseAdmin" + }, + { + "metadata": { + "filename": "dataverse-sample-data/data/dataverses/ecastro/datasets/this-is-my-test-dataset/files/N.fits" + }, + "data-type": "datafile", + "action": "upload", + "id-type": "dvtests", + "parent-id": "ecastro", + "parent-type": "dataset", + "user-handle": "dataverseAdmin" + }, + { + "metadata": { + "filename": "dataverse-sample-data/data/dataverses/ecastro/datasets/this-is-my-test-dataset/files/N_err.fits" + }, + "data-type": "datafile", + "action": "upload", + "id-type": "dvtests", + "parent-id": "ecastro", + "parent-type": "dataset", + "user-handle": "dataverseAdmin" + }, + { + "metadata": { + "filename": "dataverse-sample-data/data/dataverses/ecastro/datasets/this-is-my-test-dataset/files/T.fits" + }, + "data-type": "datafile", + "action": "upload", + "id-type": "dvtests", + "parent-id": "ecastro", + "parent-type": "dataset", + "user-handle": "dataverseAdmin" + }, + { + "metadata": { + "filename": "dataverse-sample-data/data/dataverses/ecastro/datasets/this-is-my-test-dataset/files/T_err.fits" + }, + "data-type": "datafile", + "action": "upload", + "id-type": "dvtests", + "parent-id": "ecastro", + "parent-type": "dataset", + "user-handle": "dataverseAdmin" + }, + { + "metadata": { + "filename": "dataverse-sample-data/data/dataverses/ecastro/datasets/this-is-my-test-dataset/files/test.pdf" + }, + "data-type": "datafile", + "action": "upload", + "id-type": "dvtests", + "parent-id": "ecastro", + "parent-type": "dataset", + "user-handle": "dataverseAdmin" + }, + { + "metadata": { + "filename": "dataverse-sample-data/data/dataverses/ecastro/datasets/this-is-my-test-dataset/files/triad-data-5466.sav" + }, + "data-type": "datafile", + "action": "upload", + "id-type": "dvtests", + "parent-id": "ecastro", + "parent-type": "dataset", + "user-handle": "dataverseAdmin" + }, + { + "metadata": { + "filename": "dataverse-sample-data/data/dataverses/cms/datasets/cmssampledata/files/data users document.pdf" + }, + "data-type": "datafile", + "action": "upload", + "id-type": "dvtests", + "parent-id": "cms", + "parent-type": "dataset", + "user-handle": "dataverseAdmin" + }, + { + "metadata": { + "filename": "dataverse-sample-data/data/dataverses/cms/datasets/cmssampledata/files/DE1_0_2008_Beneficiary_Summary_File_Sample_1.zip" + }, + "data-type": "datafile", + "action": "upload", + "id-type": "dvtests", + "parent-id": "cms", + "parent-type": "dataset", + "user-handle": "dataverseAdmin" + }, + { + "metadata": { + "filename": "dataverse-sample-data/data/dataverses/cms/datasets/cmssampledata/files/DE1_0_2008_Beneficiary_Summary_File_Sample_2.zip" + }, + "data-type": "datafile", + "action": "upload", + "id-type": "dvtests", + "parent-id": "cms", + "parent-type": "dataset", + "user-handle": "dataverseAdmin" + }, + { + "metadata": { + "filename": "dataverse-sample-data/data/dataverses/cms/datasets/cmssampledata/files/DE1_0_2008_Beneficiary_Summary_File_Sample_3.zip" + }, + "data-type": "datafile", + "action": "upload", + "id-type": "dvtests", + "parent-id": "cms", + "parent-type": "dataset", + "user-handle": "dataverseAdmin" + }, + { + "metadata": { + "filename": "dataverse-sample-data/data/dataverses/cms/datasets/cmssampledata/files/DE1_0_2008_to_2010_Inpatient_Claims_Sample_1.zip" + }, + "data-type": "datafile", + "action": "upload", + "id-type": "dvtests", + "parent-id": "cms", + "parent-type": "dataset", + "user-handle": "dataverseAdmin" + }, + { + "metadata": { + "filename": "dataverse-sample-data/data/dataverses/cms/datasets/cmssampledata/files/DE1_0_2008_to_2010_Inpatient_Claims_Sample_2.zip" + }, + "data-type": "datafile", + "action": "upload", + "id-type": "dvtests", + "parent-id": "cms", + "parent-type": "dataset", + "user-handle": "dataverseAdmin" + }, + { + "metadata": { + "filename": "dataverse-sample-data/data/dataverses/cms/datasets/cmssampledata/files/DE1_0_2009_Beneficiary_Summary_File_Sample_1.zip" + }, + "data-type": "datafile", + "action": "upload", + "id-type": "dvtests", + "parent-id": "cms", + "parent-type": "dataset", + "user-handle": "dataverseAdmin" + }, + { + "metadata": { + "filename": "dataverse-sample-data/data/dataverses/cms/datasets/cmssampledata/files/DE1_0_2009_Beneficiary_Summary_File_Sample_2.zip" + }, + "data-type": "datafile", + "action": "upload", + "id-type": "dvtests", + "parent-id": "cms", + "parent-type": "dataset", + "user-handle": "dataverseAdmin" + }, + { + "metadata": { + "filename": "dataverse-sample-data/data/dataverses/cms/datasets/cmssampledata/files/DE1_0_2010_Beneficiary_Summary_File_Sample_1.zip" + }, + "data-type": "datafile", + "action": "upload", + "id-type": "dvtests", + "parent-id": "cms", + "parent-type": "dataset", + "user-handle": "dataverseAdmin" + }, + { + "metadata": { + "filename": "dataverse-sample-data/data/dataverses/cms/datasets/cmssampledata/files/DE1_0_2010_Beneficiary_Summary_File_Sample_2.zip" + }, + "data-type": "datafile", + "action": "upload", + "id-type": "dvtests", + "parent-id": "cms", + "parent-type": "dataset", + "user-handle": "dataverseAdmin" + }, + { + "metadata": { + "filename": "dataverse-sample-data/data/dataverses/cms/datasets/cmssampledata/files/DE1_0_2010_Beneficiary_Summary_File_Sample_3.zip" + }, + "data-type": "datafile", + "action": "upload", + "id-type": "dvtests", + "parent-id": "cms", + "parent-type": "dataset", + "user-handle": "dataverseAdmin" + }, + { + "metadata": { + "filename": "dataverse-sample-data/data/dataverses/cms/datasets/cmssampledata/files/SynPUF_Codebook.pdf" + }, + "data-type": "datafile", + "action": "upload", + "id-type": "dvtests", + "parent-id": "cms", + "parent-type": "dataset", + "user-handle": "dataverseAdmin" + }, + { + "metadata": { + "filename": "dataverse-sample-data/data/dataverses/ubiquity-press/dataverses/jopd/datasets/flynn-effect-in-estonia/files/FE_1933_2006_data_subset.csv" + }, + "data-type": "datafile", + "action": "upload", + "id-type": "dvtests", + "parent-id": "jopd", + "parent-type": "dataset", + "user-handle": "dataverseAdmin" + }, + { + "metadata": { + "filename": "dataverse-sample-data/data/dataverses/ubiquity-press/dataverses/jopd/datasets/flynn-effect-in-estonia/files/FE_1933_2006_data_subset.sav" + }, + "data-type": "datafile", + "action": "upload", + "id-type": "dvtests", + "parent-id": "jopd", + "parent-type": "dataset", + "user-handle": "dataverseAdmin" + }, + { + "metadata": { + "filename": "dataverse-sample-data/data/dataverses/ubiquity-press/dataverses/jopd/datasets/bafacalo/files/bafacalo_dataset_subset.sav" + }, + "data-type": "datafile", + "action": "upload", + "id-type": "dvtests", + "parent-id": "bafacalo", + "parent-type": "dataset", + "user-handle": "dataverseAdmin" + }, + { + "metadata": { + "filename": "dataverse-sample-data/data/dataverses/open-source-at-harvard/datasets/open-source-at-harvard/.filemetadata/language-count.sh.json" + }, + "filename": "dataverse-sample-data/data/dataverses/open-source-at-harvard/datasets/open-source-at-harvard/files/code/language-count.sh", + "data-type": "datafile", + "action": "upload", + "id-type": "dvtests", + "parent-id": "open-source", + "parent-type": "dataset", + "user-handle": "dataverseAdmin" + }, + { + "metadata": { + "filename": "dataverse-sample-data/data/dataverses/open-source-at-harvard/datasets/open-source-at-harvard/.filemetadata/2019-02-25.tsv.json" + }, + "filename": "dataverse-sample-data/data/dataverses/open-source-at-harvard/datasets/open-source-at-harvard/files/data/2019-02-25.tsv", + "data-type": "datafile", + "action": "upload", + "id-type": "dvtests", + "parent-id": "open-source", + "parent-type": "dataset", + "user-handle": "dataverseAdmin" + }, + { + "metadata": { + "filename": "dataverse-sample-data/data/dataverses/open-source-at-harvard/datasets/open-source-at-harvard/.filemetadata/README_private.txt.json" + }, + "filename": "dataverse-sample-data/data/dataverses/open-source-at-harvard/datasets/open-source-at-harvard/files/doc/README_private.txt", + "data-type": "datafile", + "action": "upload", + "id-type": "dvtests", + "parent-id": "open-source", + "parent-type": "dataset", + "user-handle": "dataverseAdmin" + }, + { + "metadata": { + "metadata-filename": "dataverse-sample-data/data/dataverses/open-source-at-harvard/datasets/open-source-at-harvard/.filemetadata/language-count.tsv.json", + "filename": "dataverse-sample-data/data/dataverses/open-source-at-harvard/datasets/open-source-at-harvard/files/results/language-count.tsv", + "data-type": "datafile", + "action": "upload", + "id-type": "dvtests", + "parent-id": "open-source", + "parent-type": "dataset", + "user-handle": "dataverseAdmin" } - ], - "datasets": [ - { - "id": 0, - "create": { - "user-handle": "dataverseAdmin", - "metadata-filename": "dataverse-sample-data/data/dataverses/open-source-at-harvard/dataverses/dataverse-project/datasets/dataverse-irc-metrics/dataverse-irc-metrics.json", - "parent": "test_create_testdata" - }, - "publish": { - "user-handle": "dataverseAdmin" - } - }, - { - "id": 1, - "create": { - "user-handle": "dataverseAdmin", - "metadata-filename": "dataverse-sample-data/data/dataverses/HCPDS/datasets/reproductive-health-laws-around-the-world/reproductive-health-laws-around-the-world.json", - "parent": "test_create_testdata" - }, - "publish": { - "user-handle": "dataverseAdmin" - } - }, - { - "id": 2, - "create": { - "user-handle": "dataverseAdmin", - "metadata-filename": "dataverse-sample-data/data/dataverses/ecastro/datasets/this-is-my-test-dataset/this-is-my-test-dataset.json", - "parent": "test_create_testdata" - }, - "publish": { - "user-handle": "dataverseAdmin" - } - }, - { - "id": 3, - "create": { - "user-handle": "dataverseAdmin", - "metadata-filename": "dataverse-sample-data/data/dataverses/cms/datasets/cmssampledata/cmssampledata.json", - "parent": "test_create_testdata" - }, - "publish": { - "user-handle": "dataverseAdmin" - } - }, - { - "id": 4, - "create": { - "user-handle": "dataverseAdmin", - "metadata-filename": "dataverse-sample-data/data/dataverses/scholcommlab/datasets/diabeticconnect/diabeticconnect.json", - "parent": "test_create_testdata" - }, - "publish": { - "user-handle": "dataverseAdmin" - } - }, - { - "id": 5, - "create": { - "user-handle": "dataverseAdmin", - "metadata-filename": "dataverse-sample-data/data/dataverses/ubiquity-press/dataverses/jopd/datasets/flynn-effect-in-estonia/flynn-effect-in-estonia.json", - "parent": "test_create_testdata" - }, - "publish": { - "user-handle": "dataverseAdmin" - } - }, - { - "id": 6, - "create": { - "user-handle": "dataverseAdmin", - "metadata-filename": "dataverse-sample-data/data/dataverses/ubiquity-press/dataverses/jopd/datasets/bafacalo/bafacalo.json", - "parent": "test_create_testdata" - }, - "publish": { - "user-handle": "dataverseAdmin" - } - }, - { - "id": 7, - "create": { - "user-handle": "dataverseAdmin", - "metadata-filename": "dataverse-sample-data/data/dataverses/open-source-at-harvard/datasets/open-source-at-harvard/open-source-at-harvard.json", - "parent": "test_create_testdata" - }, - "publish": { - "user-handle": "dataverseAdmin" - } - }, - { - "id": 8, - "create": { - "user-handle": "dataverseAdmin", - "metadata-filename": "dataverse-sample-data/data/dataverses/king/datasets/cause-of-death/cause-of-death.json", - "parent": "test_create_testdata" - }, - "publish": { - "user-handle": "dataverseAdmin" - } - }, - { - "id": 9, - "create": { - "user-handle": "dataverseAdmin", - "metadata-filename": "dataverse-sample-data/data/dataverses/manchester/datasets/test-dataset/test-dataset.json", - "parent": "test_create_testdata" - }, - "publish": { - "user-handle": "dataverseAdmin" - } - }, - { - "id": 10, - "create": { - "user-handle": "dataverseAdmin", - "metadata-filename": "dataverse-sample-data/data/dataverses/dataverseno/datasets/tabular-sample-data/tabular-sample-data.json", - "parent": "test_create_testdata" - }, - "publish": { - "user-handle": "dataverseAdmin" - } - }, - { - "id": 11, - "create": { - "user-handle": "dataverseAdmin", - "metadata-filename": "dataverse-sample-data/data/dataverses/scholcommlab/datasets/diabeticconnect/diabeticconnect.json", - "parent": "test_create_testdata" - }, - "publish": { - "user-handle": "dataverseAdmin" - } + }, + { + "metadata": { + "metadata-filename": "dataverse-sample-data/data/dataverses/open-source-at-harvard/datasets/open-source-at-harvard/.filemetadata/run.sh.json", + "filename": "dataverse-sample-data/data/dataverses/open-source-at-harvard/datasets/open-source-at-harvard/files/run.sh", + "data-type": "datafile", + "action": "upload", + "id-type": "dvtests", + "parent-id": "open-source", + "parent-type": "dataset", + "user-handle": "dataverseAdmin" } - ], - "datafiles": { - "1": [ - { - "upload": { - "user-handle": "dataverseAdmin", - "filename": "dataverse-sample-data/data/dataverses/HCPDS/datasets/reproductive-health-laws-around-the-world/files/Chrysanthemum.jpg" - }, - "publish-dataset": { - "user-handle": "dataverseAdmin" - } - }, - { - "upload": { - "user-handle": "dataverseAdmin", - "filename": "dataverse-sample-data/data/dataverses/HCPDS/datasets/reproductive-health-laws-around-the-world/files/Desert.jpg" - }, - "publish-dataset": { - "user-handle": "dataverseAdmin" - } - }, - { - "upload": { - "user-handle": "dataverseAdmin", - "filename": "dataverse-sample-data/data/dataverses/HCPDS/datasets/reproductive-health-laws-around-the-world/files/gss.dta" - }, - "publish-dataset": { - "user-handle": "dataverseAdmin" - } - } - ], - "2": [ - { - "upload": { - "user-handle": "dataverseAdmin", - "filename": "dataverse-sample-data/data/dataverses/ecastro/datasets/this-is-my-test-dataset/files/DatasetDiagram.png" - }, - "publish-dataset": { - "user-handle": "dataverseAdmin" - } - }, - { - "upload": { - "user-handle": "dataverseAdmin", - "filename": "dataverse-sample-data/data/dataverses/ecastro/datasets/this-is-my-test-dataset/files/L.fits" - }, - "publish-dataset": { - "user-handle": "dataverseAdmin" - } - }, - { - "upload": { - "user-handle": "dataverseAdmin", - "filename": "dataverse-sample-data/data/dataverses/ecastro/datasets/this-is-my-test-dataset/files/L_over_M.fits" - }, - "publish-dataset": { - "user-handle": "dataverseAdmin" - } - }, - { - "upload": { - "user-handle": "dataverseAdmin", - "filename": "dataverse-sample-data/data/dataverses/ecastro/datasets/this-is-my-test-dataset/files/M.fits" - }, - "publish-dataset": { - "user-handle": "dataverseAdmin" - } - }, - { - "upload": { - "user-handle": "dataverseAdmin", - "filename": "dataverse-sample-data/data/dataverses/ecastro/datasets/this-is-my-test-dataset/files/M_err.fits" - }, - "publish-dataset": { - "user-handle": "dataverseAdmin" - } - }, - { - "upload": { - "user-handle": "dataverseAdmin", - "filename": "dataverse-sample-data/data/dataverses/ecastro/datasets/this-is-my-test-dataset/files/N.fits" - }, - "publish-dataset": { - "user-handle": "dataverseAdmin" - } - }, - { - "upload": { - "user-handle": "dataverseAdmin", - "filename": "dataverse-sample-data/data/dataverses/ecastro/datasets/this-is-my-test-dataset/files/N_err.fits" - }, - "publish-dataset": { - "user-handle": "dataverseAdmin" - } - }, - { - "upload": { - "user-handle": "dataverseAdmin", - "filename": "dataverse-sample-data/data/dataverses/ecastro/datasets/this-is-my-test-dataset/files/T.fits" - }, - "publish-dataset": { - "user-handle": "dataverseAdmin" - } - }, - { - "upload": { - "user-handle": "dataverseAdmin", - "filename": "dataverse-sample-data/data/dataverses/ecastro/datasets/this-is-my-test-dataset/files/T_err.fits" - }, - "publish-dataset": { - "user-handle": "dataverseAdmin" - } - }, - { - "upload": { - "user-handle": "dataverseAdmin", - "filename": "dataverse-sample-data/data/dataverses/ecastro/datasets/this-is-my-test-dataset/files/test.pdf" - }, - "publish-dataset": { - "user-handle": "dataverseAdmin" - } - }, - { - "upload": { - "user-handle": "dataverseAdmin", - "filename": "dataverse-sample-data/data/dataverses/ecastro/datasets/this-is-my-test-dataset/files/triad-data-5466.sav" - }, - "publish-dataset": { - "user-handle": "dataverseAdmin" - } - } - ], - "3": [ - { - "upload": { - "user-handle": "dataverseAdmin", - "filename": "dataverse-sample-data/data/dataverses/cms/datasets/cmssampledata/files/data users document.pdf" - }, - "publish-dataset": { - "user-handle": "dataverseAdmin" - } - }, - { - "upload": { - "user-handle": "dataverseAdmin", - "filename": "dataverse-sample-data/data/dataverses/cms/datasets/cmssampledata/files/DE1_0_2008_Beneficiary_Summary_File_Sample_1.zip" - }, - "publish-dataset": { - "user-handle": "dataverseAdmin" - } - }, - { - "upload": { - "user-handle": "dataverseAdmin", - "filename": "dataverse-sample-data/data/dataverses/cms/datasets/cmssampledata/files/DE1_0_2008_Beneficiary_Summary_File_Sample_2.zip" - }, - "publish-dataset": { - "user-handle": "dataverseAdmin" - } - }, - { - "upload": { - "user-handle": "dataverseAdmin", - "filename": "dataverse-sample-data/data/dataverses/cms/datasets/cmssampledata/files/DE1_0_2008_Beneficiary_Summary_File_Sample_3.zip" - }, - "publish-dataset": { - "user-handle": "dataverseAdmin" - } - }, - { - "upload": { - "user-handle": "dataverseAdmin", - "filename": "dataverse-sample-data/data/dataverses/cms/datasets/cmssampledata/files/DE1_0_2008_to_2010_Inpatient_Claims_Sample_1.zip" - }, - "publish-dataset": { - "user-handle": "dataverseAdmin" - } - }, - { - "upload": { - "user-handle": "dataverseAdmin", - "filename": "dataverse-sample-data/data/dataverses/cms/datasets/cmssampledata/files/DE1_0_2008_to_2010_Inpatient_Claims_Sample_2.zip" - }, - "publish-dataset": { - "user-handle": "dataverseAdmin" - } - }, - { - "upload": { - "user-handle": "dataverseAdmin", - "filename": "dataverse-sample-data/data/dataverses/cms/datasets/cmssampledata/files/DE1_0_2009_Beneficiary_Summary_File_Sample_1.zip" - }, - "publish-dataset": { - "user-handle": "dataverseAdmin" - } - }, - { - "upload": { - "user-handle": "dataverseAdmin", - "filename": "dataverse-sample-data/data/dataverses/cms/datasets/cmssampledata/files/DE1_0_2009_Beneficiary_Summary_File_Sample_2.zip" - }, - "publish-dataset": { - "user-handle": "dataverseAdmin" - } - }, - { - "upload": { - "user-handle": "dataverseAdmin", - "filename": "dataverse-sample-data/data/dataverses/cms/datasets/cmssampledata/files/DE1_0_2010_Beneficiary_Summary_File_Sample_1.zip" - }, - "publish-dataset": { - "user-handle": "dataverseAdmin" - } - }, - { - "upload": { - "user-handle": "dataverseAdmin", - "filename": "dataverse-sample-data/data/dataverses/cms/datasets/cmssampledata/files/DE1_0_2010_Beneficiary_Summary_File_Sample_2.zip" - }, - "publish-dataset": { - "user-handle": "dataverseAdmin" - } - }, - { - "upload": { - "user-handle": "dataverseAdmin", - "filename": "dataverse-sample-data/data/dataverses/cms/datasets/cmssampledata/files/DE1_0_2010_Beneficiary_Summary_File_Sample_3.zip" - }, - "publish-dataset": { - "user-handle": "dataverseAdmin" - } - }, - { - "upload": { - "user-handle": "dataverseAdmin", - "filename": "dataverse-sample-data/data/dataverses/cms/datasets/cmssampledata/files/SynPUF_Codebook.pdf" - }, - "publish-dataset": { - "user-handle": "dataverseAdmin" - } - } - ], - "5": [ - { - "upload": { - "user-handle": "dataverseAdmin", - "filename": "dataverse-sample-data/data/dataverses/ubiquity-press/dataverses/jopd/datasets/flynn-effect-in-estonia/files/FE_1933_2006_data_subset.csv" - }, - "publish-dataset": { - "user-handle": "dataverseAdmin" - } - }, - { - "upload": { - "user-handle": "dataverseAdmin", - "filename": "dataverse-sample-data/data/dataverses/ubiquity-press/dataverses/jopd/datasets/flynn-effect-in-estonia/files/FE_1933_2006_data_subset.sav" - }, - "publish-dataset": { - "user-handle": "dataverseAdmin" - } - } - ], - "6": [ - { - "upload": { - "user-handle": "dataverseAdmin", - "filename": "dataverse-sample-data/data/dataverses/ubiquity-press/dataverses/jopd/datasets/bafacalo/files/bafacalo_dataset_subset.sav" - }, - "publish-dataset": { - "user-handle": "dataverseAdmin" - } - } - ], - "7": [ - { - "upload": { - "user-handle": "dataverseAdmin", - "metadata-filename": "dataverse-sample-data/data/dataverses/open-source-at-harvard/datasets/open-source-at-harvard/.filemetadata/language-count.sh.json", - "filename": "dataverse-sample-data/data/dataverses/open-source-at-harvard/datasets/open-source-at-harvard/files/code/language-count.sh" - }, - "publish-dataset": { - "user-handle": "dataverseAdmin" - } - }, - { - "upload": { - "user-handle": "dataverseAdmin", - "metadata-filename": "dataverse-sample-data/data/dataverses/open-source-at-harvard/datasets/open-source-at-harvard/.filemetadata/2019-02-25.tsv.json", - "filename": "dataverse-sample-data/data/dataverses/open-source-at-harvard/datasets/open-source-at-harvard/files/data/2019-02-25.tsv" - }, - "publish-dataset": { - "user-handle": "dataverseAdmin" - } - }, - { - "upload": { - "user-handle": "dataverseAdmin", - "metadata-filename": "dataverse-sample-data/data/dataverses/open-source-at-harvard/datasets/open-source-at-harvard/.filemetadata/README_private.txt.json", - "filename": "dataverse-sample-data/data/dataverses/open-source-at-harvard/datasets/open-source-at-harvard/files/doc/README_private.txt" - }, - "publish-dataset": { - "user-handle": "dataverseAdmin" - } - }, - { - "upload": { - "user-handle": "dataverseAdmin", - "metadata-filename": "dataverse-sample-data/data/dataverses/open-source-at-harvard/datasets/open-source-at-harvard/.filemetadata/language-count.tsv.json", - "filename": "dataverse-sample-data/data/dataverses/open-source-at-harvard/datasets/open-source-at-harvard/files/results/language-count.tsv" - }, - "publish-dataset": { - "user-handle": "dataverseAdmin" - } - }, - { - "upload": { - "user-handle": "dataverseAdmin", - "metadata-filename": "dataverse-sample-data/data/dataverses/open-source-at-harvard/datasets/open-source-at-harvard/.filemetadata/run.sh.json", - "filename": "dataverse-sample-data/data/dataverses/open-source-at-harvard/datasets/open-source-at-harvard/files/run.sh" - }, - "publish-dataset": { - "user-handle": "dataverseAdmin" - } - } - ], - "8": [ - { - "upload": { - "user-handle": "dataverseAdmin", - "filename": "dataverse-sample-data/data/dataverses/king/datasets/cause-of-death/files/adjacency_subset.sav" - }, - "publish-dataset": { - "user-handle": "dataverseAdmin" - } - }, - { - "upload": { - "user-handle": "dataverseAdmin", - "filename": "dataverse-sample-data/data/dataverses/king/datasets/cause-of-death/files/allc_subset.sav" - }, - "publish-dataset": { - "user-handle": "dataverseAdmin" - } - } - ], - "9": [ - { - "upload": { - "user-handle": "dataverseAdmin", - "filename": "dataverse-sample-data/data/dataverses/manchester/datasets/test-dataset/files/50by1000.tab" - }, - "publish-dataset": { - "user-handle": "dataverseAdmin" - } - }, - { - "upload": { - "user-handle": "dataverseAdmin", - "filename": "dataverse-sample-data/data/dataverses/manchester/datasets/test-dataset/files/00169Fiske-Longitudinal-BoxCoverSheets.pdf" - }, - "publish-dataset": { - "user-handle": "dataverseAdmin" - } - }, - { - "upload": { - "user-handle": "dataverseAdmin", - "filename": "dataverse-sample-data/data/dataverses/manchester/datasets/test-dataset/files/20150610_091644_dataversecommunitymeeting2015-1668.jpg" - }, - "publish-dataset": { - "user-handle": "dataverseAdmin" - } - }, - { - "upload": { - "user-handle": "dataverseAdmin", - "filename": "dataverse-sample-data/data/dataverses/manchester/datasets/test-dataset/files/ak_2016.zip" - }, - "publish-dataset": { - "user-handle": "dataverseAdmin" - } - }, - { - "upload": { - "user-handle": "dataverseAdmin", - "filename": "dataverse-sample-data/data/dataverses/manchester/datasets/test-dataset/files/co_2016.zip" - }, - "publish-dataset": { - "user-handle": "dataverseAdmin" - } - }, - { - "upload": { - "user-handle": "dataverseAdmin", - "filename": "dataverse-sample-data/data/dataverses/manchester/datasets/test-dataset/files/dataverse_project_logo_1.png" - }, - "publish-dataset": { - "user-handle": "dataverseAdmin" - } - }, - { - "upload": { - "user-handle": "dataverseAdmin", - "filename": "dataverse-sample-data/data/dataverses/manchester/datasets/test-dataset/files/de_2016.zip" - }, - "publish-dataset": { - "user-handle": "dataverseAdmin" - } - }, - { - "upload": { - "user-handle": "dataverseAdmin", - "filename": "dataverse-sample-data/data/dataverses/manchester/datasets/test-dataset/files/hi_2016.zip" - }, - "publish-dataset": { - "user-handle": "dataverseAdmin" - } - }, - { - "upload": { - "user-handle": "dataverseAdmin", - "filename": "dataverse-sample-data/data/dataverses/manchester/datasets/test-dataset/files/IMG_0166.PNG" - }, - "publish-dataset": { - "user-handle": "dataverseAdmin" - } - }, - { - "upload": { - "user-handle": "dataverseAdmin", - "filename": "dataverse-sample-data/data/dataverses/manchester/datasets/test-dataset/files/IMG_2199.JPG" - }, - "publish-dataset": { - "user-handle": "dataverseAdmin" - } - }, - { - "upload": { - "user-handle": "dataverseAdmin", - "filename": "dataverse-sample-data/data/dataverses/manchester/datasets/test-dataset/files/Intersections_(Census).zip" - }, - "publish-dataset": { - "user-handle": "dataverseAdmin" - } - }, - { - "upload": { - "user-handle": "dataverseAdmin", - "filename": "dataverse-sample-data/data/dataverses/manchester/datasets/test-dataset/files/ma_2016.zip" - }, - "publish-dataset": { - "user-handle": "dataverseAdmin" - } - }, - { - "upload": { - "user-handle": "dataverseAdmin", - "filename": "dataverse-sample-data/data/dataverses/manchester/datasets/test-dataset/files/ri_2016.zip" - }, - "publish-dataset": { - "user-handle": "dataverseAdmin" - } - } - ], - "10": [ - { - "upload": { - "user-handle": "dataverseAdmin", - "filename": "dataverse-sample-data/data/dataverses/dataverseno/datasets/tabular-sample-data/files/Tabular_Sample_Data.txt" - }, - "publish-dataset": { - "user-handle": "dataverseAdmin" - } - }, - { - "upload": { - "user-handle": "dataverseAdmin", - "filename": "dataverse-sample-data/data/dataverses/dataverseno/datasets/tabular-sample-data/files/Tabular_Sample_Data.xlsx" - }, - "publish-dataset": { - "user-handle": "dataverseAdmin" - } - } - ], - "11": [ - { - "upload": { - "user-handle": "dataverseAdmin", - "filename": "dataverse-sample-data/data/dataverses/scholcommlab/datasets/diabeticconnect/files/DiabeticConnect_titles_tags_content_subset25percent.sav" - }, - "publish-dataset": { - "user-handle": "dataverseAdmin" - } - }, - { - "upload": { - "user-handle": "dataverseAdmin", - "filename": "dataverse-sample-data/data/dataverses/scholcommlab/datasets/diabeticconnect/files/DiabeticConnect_titles_tags_content_subset50percent.sav" - }, - "publish-dataset": { - "user-handle": "dataverseAdmin" - } - } - ] + }, + { + "metadata": { + "filename": "dataverse-sample-data/data/dataverses/king/datasets/cause-of-death/files/adjacency_subset.sav" + }, + "data-type": "datafile", + "action": "upload", + "id-type": "dvtests", + "parent-id": "king", + "parent-type": "dataset", + "user-handle": "dataverseAdmin" + }, + { + "metadata": { + "filename": "dataverse-sample-data/data/dataverses/king/datasets/cause-of-death/files/allc_subset.sav" + }, + "data-type": "datafile", + "action": "upload", + "id-type": "dvtests", + "parent-id": "king", + "parent-type": "dataset", + "user-handle": "dataverseAdmin" + }, + { + "metadata": { + "filename": "dataverse-sample-data/data/dataverses/manchester/datasets/test-dataset/files/50by1000.tab" + }, + "data-type": "datafile", + "action": "upload", + "id-type": "dvtests", + "parent-id": "manchester", + "parent-type": "dataset", + "user-handle": "dataverseAdmin" + }, + { + "metadata": { + "filename": "dataverse-sample-data/data/dataverses/manchester/datasets/test-dataset/files/00169Fiske-Longitudinal-BoxCoverSheets.pdf" + }, + "data-type": "datafile", + "action": "upload", + "id-type": "dvtests", + "parent-id": "manchester", + "parent-type": "dataset", + "user-handle": "dataverseAdmin" + }, + { + "metadata": { + "filename": "dataverse-sample-data/data/dataverses/manchester/datasets/test-dataset/files/20150610_091644_dataversecommunitymeeting2015-1668.jpg" + }, + "data-type": "datafile", + "action": "upload", + "id-type": "dvtests", + "parent-id": "manchester", + "parent-type": "dataset", + "user-handle": "dataverseAdmin" + }, + { + "metadata": { + "filename": "dataverse-sample-data/data/dataverses/manchester/datasets/test-dataset/files/ak_2016.zip" + }, + "data-type": "datafile", + "action": "upload", + "id-type": "dvtests", + "parent-id": "manchester", + "parent-type": "dataset", + "user-handle": "dataverseAdmin" + }, + { + "metadata": { + "filename": "dataverse-sample-data/data/dataverses/manchester/datasets/test-dataset/files/co_2016.zip" + }, + "data-type": "datafile", + "action": "upload", + "id-type": "dvtests", + "parent-id": "manchester", + "parent-type": "dataset", + "user-handle": "dataverseAdmin" + }, + { + "metadata": { + "filename": "dataverse-sample-data/data/dataverses/manchester/datasets/test-dataset/files/dataverse_project_logo_1.png" + }, + "data-type": "datafile", + "action": "upload", + "id-type": "dvtests", + "parent-id": "manchester", + "parent-type": "dataset", + "user-handle": "dataverseAdmin" + }, + { + "metadata": { + "filename": "dataverse-sample-data/data/dataverses/manchester/datasets/test-dataset/files/de_2016.zip" + }, + "data-type": "datafile", + "action": "upload", + "id-type": "dvtests", + "parent-id": "manchester", + "parent-type": "dataset", + "user-handle": "dataverseAdmin" + }, + { + "metadata": { + "filename": "dataverse-sample-data/data/dataverses/manchester/datasets/test-dataset/files/hi_2016.zip" + }, + "data-type": "datafile", + "action": "upload", + "id-type": "dvtests", + "parent-id": "manchester", + "parent-type": "dataset", + "user-handle": "dataverseAdmin" + }, + { + "metadata": { + "filename": "dataverse-sample-data/data/dataverses/manchester/datasets/test-dataset/files/IMG_0166.PNG" + }, + "data-type": "datafile", + "action": "upload", + "id-type": "dvtests", + "parent-id": "manchester", + "parent-type": "dataset", + "user-handle": "dataverseAdmin" + }, + { + "metadata": { + "filename": "dataverse-sample-data/data/dataverses/manchester/datasets/test-dataset/files/IMG_2199.JPG" + }, + "data-type": "datafile", + "action": "upload", + "id-type": "dvtests", + "parent-id": "manchester", + "parent-type": "dataset", + "user-handle": "dataverseAdmin" + }, + { + "metadata": { + "filename": "dataverse-sample-data/data/dataverses/manchester/datasets/test-dataset/files/Intersections_(Census).zip" + }, + "data-type": "datafile", + "action": "upload", + "id-type": "dvtests", + "parent-id": "manchester", + "parent-type": "dataset", + "user-handle": "dataverseAdmin" + }, + { + "metadata": { + "filename": "dataverse-sample-data/data/dataverses/manchester/datasets/test-dataset/files/ma_2016.zip" + }, + "data-type": "datafile", + "action": "upload", + "id-type": "dvtests", + "parent-id": "manchester", + "parent-type": "dataset", + "user-handle": "dataverseAdmin" + }, + { + "metadata": { + "filename": "dataverse-sample-data/data/dataverses/manchester/datasets/test-dataset/files/ri_2016.zip" + }, + "data-type": "datafile", + "action": "upload", + "id-type": "dvtests", + "parent-id": "manchester", + "parent-type": "dataset", + "user-handle": "dataverseAdmin" + }, + { + "metadata": { + "filename": "dataverse-sample-data/data/dataverses/dataverseno/datasets/tabular-sample-data/files/Tabular_Sample_Data.txt" + }, + "data-type": "datafile", + "action": "upload", + "id-type": "dvtests", + "parent-id": "dataverseno", + "parent-type": "dataset", + "user-handle": "dataverseAdmin" + }, + { + "metadata": { + "filename": "dataverse-sample-data/data/dataverses/dataverseno/datasets/tabular-sample-data/files/Tabular_Sample_Data.xlsx" + }, + "data-type": "datafile", + "action": "upload", + "id-type": "dvtests", + "parent-id": "dataverseno", + "parent-type": "dataset", + "user-handle": "dataverseAdmin" + }, + { + "metadata": { + "filename": "dataverse-sample-data/data/dataverses/scholcommlab/datasets/diabeticconnect/files/DiabeticConnect_titles_tags_content_subset25percent.sav" + }, + "data-type": "datafile", + "action": "upload", + "id-type": "dvtests", + "parent-id": "scholcommlab", + "parent-type": "dataset", + "user-handle": "dataverseAdmin" + }, + { + "metadata": { + "filename": "dataverse-sample-data/data/dataverses/scholcommlab/datasets/diabeticconnect/files/DiabeticConnect_titles_tags_content_subset50percent.sav" + }, + "data-type": "datafile", + "action": "upload", + "id-type": "dvtests", + "parent-id": "scholcommlab", + "parent-type": "dataset", + "user-handle": "dataverseAdmin" } -} +] diff --git a/env-config/example.env b/env-config/example.env index 61b4635..6ba13a3 100644 --- a/env-config/example.env +++ b/env-config/example.env @@ -1,6 +1,6 @@ # ENV variables general BASE_URL="https://example.org" -VERSION="x.y.z" +VERSION="dataverse_x-y" USER_AGENT="TESTING" # ENV variables for testing @@ -8,6 +8,5 @@ USER_FILENAME="" LOGIN_OPTIONS="[\"LOGION_OPTION_1\",\"LOGION_OPTION_2\"]" SHIBBOLETH_INSTITUTION="" SHIBBOLETH_LOGIN_PAGE_TITLE="" -DATA_COLLECTOR="" # ENV variables for utils diff --git a/setup.cfg b/setup.cfg index 5baaf3e..ee46070 100644 --- a/setup.cfg +++ b/setup.cfg @@ -9,6 +9,7 @@ markers = v4_20: mark test as working for Dataverse v4.20 v5_2: mark test as working for Dataverse v5.2 v5_6: mark test as working for Dataverse v5.6 + v5_7: mark test as working for Dataverse v5.7 utils: mark test which need utils generated data to be executed selenium: mark test as using selenium frontend testing smoke: mark test as smoke tests diff --git a/src/dvtests/settings.py b/src/dvtests/settings.py index b40dc69..fc70a4c 100755 --- a/src/dvtests/settings.py +++ b/src/dvtests/settings.py @@ -56,7 +56,6 @@ class TestSettings(BaseSettings): * `SHIBBOLETH_INSTITUTION`: name of Shibboleth institution for login purpose * `SHIBBOLETH_LOGIN_PAGE_TITLE`: title of Shibboleth Login page * `BUILTIN_USER_KEY`: Builtin user key to create users - * `DATA_COLLECTOR`: descriptor for data collector. It is ether 1. the user handle of dataverse user, which collected the data or 2. "public" for publicly accessible data """ @@ -77,4 +76,3 @@ class TestSettings(BaseSettings): SHIBBOLETH_INSTITUTION: str = None SHIBBOLETH_LOGIN_PAGE_TITLE: str = None BUILTIN_USER_KEY: str = None - DATA_COLLECTOR: str = None diff --git a/src/dvtests/testing/conftest.py b/src/dvtests/testing/conftest.py index 876e0f0..7390f4f 100644 --- a/src/dvtests/testing/conftest.py +++ b/src/dvtests/testing/conftest.py @@ -29,7 +29,7 @@ ROOT_DIR, "configs/installations", CONFIG.INSTANCE, "utils" ) TESTDATA_METADATA_JSON_DIR = os.path.join(ROOT_DIR, "dataverse_testdata/metadata/json") -UTILS_DATA_DIR = os.path.join(ROOT_DIR, "data", CONFIG.INSTANCE, CONFIG.DATA_COLLECTOR) +UTILS_DATA_DIR = os.path.join(ROOT_DIR, "data", CONFIG.INSTANCE) @pytest.fixture() @@ -201,6 +201,7 @@ def homepage_logged_in(request, homepage, config, users): def search_navbar(selenium, config, xpaths, query): """Search via navbar.""" wait = WebDriverWait(selenium, config.MAX_WAIT_TIME) + sleep(3) navbar_search = wait.until( EC.element_to_be_clickable((By.XPATH, xpaths["search-navbar-link"])) ) diff --git a/src/dvtests/testing/default/test_api.py b/src/dvtests/testing/default/test_api.py index 5d6930f..30ff0db 100644 --- a/src/dvtests/testing/default/test_api.py +++ b/src/dvtests/testing/default/test_api.py @@ -13,9 +13,11 @@ class TestDataverse: + @pytest.mark.v4_18_1 @pytest.mark.v4_20 @pytest.mark.v5_2 @pytest.mark.v5_6 + @pytest.mark.v5_7 @pytest.mark.parametrize( "test_input,expected", test_config["dataverse"]["valid"]["input-expected"] ) diff --git a/src/dvtests/testing/default/test_installation.py b/src/dvtests/testing/default/test_installation.py index e6ab15c..51ceb18 100644 --- a/src/dvtests/testing/default/test_installation.py +++ b/src/dvtests/testing/default/test_installation.py @@ -12,6 +12,7 @@ class TestVersion: + @pytest.mark.v4_18_1 @pytest.mark.v4_20 @pytest.mark.v5_2 @pytest.mark.v5_6 @@ -32,6 +33,7 @@ def test_valid(self, native_api, config, test_input, expected): class TestServer: + @pytest.mark.v4_18_1 @pytest.mark.v4_20 @pytest.mark.v5_2 @pytest.mark.v5_6 @@ -44,6 +46,7 @@ def test_api_valid(self, native_api, test_input, expected): # Act resp = native_api.get_info_server() r_data = resp.json()["data"] + print(r_data) # Assert assert r_data["message"] == expected["url"] # Cleanup diff --git a/src/dvtests/testing/default/test_oaipmh.py b/src/dvtests/testing/default/test_oaipmh.py index f34f9ff..eaa6270 100644 --- a/src/dvtests/testing/default/test_oaipmh.py +++ b/src/dvtests/testing/default/test_oaipmh.py @@ -12,8 +12,10 @@ class TestEndpoint: + @pytest.mark.v4_18_1 @pytest.mark.v4_20 @pytest.mark.v5_6 + @pytest.mark.v5_7 @pytest.mark.parametrize( "test_input,expected", test_config["endpoint"]["valid"]["input-expected"] ) diff --git a/src/dvtests/testing/default/test_registration.py b/src/dvtests/testing/default/test_registration.py index 7c016b5..5b06855 100644 --- a/src/dvtests/testing/default/test_registration.py +++ b/src/dvtests/testing/default/test_registration.py @@ -18,6 +18,7 @@ class TestTerms: + @pytest.mark.v4_18_1 @pytest.mark.v4_20 @pytest.mark.v5_6 @pytest.mark.parametrize( diff --git a/src/dvtests/testing/default/test_robots_txt.py b/src/dvtests/testing/default/test_robots_txt.py index a6ab278..0962dfb 100644 --- a/src/dvtests/testing/default/test_robots_txt.py +++ b/src/dvtests/testing/default/test_robots_txt.py @@ -12,9 +12,11 @@ class TestRobotsTxt: + @pytest.mark.v4_18_1 @pytest.mark.v4_20 @pytest.mark.v5_2 @pytest.mark.v5_6 + @pytest.mark.v5_7 @pytest.mark.parametrize( "test_input,expected", test_config["robots-txt"]["valid"]["input-expected"] ) diff --git a/src/dvtests/testing/default/test_search.py b/src/dvtests/testing/default/test_search.py index 03e2b1a..2ad4899 100644 --- a/src/dvtests/testing/default/test_search.py +++ b/src/dvtests/testing/default/test_search.py @@ -14,8 +14,10 @@ class TestSearch: + @pytest.mark.v4_18_1 @pytest.mark.v4_20 @pytest.mark.v5_6 + @pytest.mark.v5_7 @pytest.mark.selenium @pytest.mark.parametrize( "test_input,expected", diff --git a/src/dvtests/utils/__init__.py b/src/dvtests/utils/__init__.py index d25c67b..aa5e74b 100644 --- a/src/dvtests/utils/__init__.py +++ b/src/dvtests/utils/__init__.py @@ -21,11 +21,10 @@ CONFIG = UtilsSettings(_env_file=os.getenv("ENV_FILE")) else: CONFIG = UtilsSettings() - ROOT_DIR = os.path.dirname( os.path.dirname(os.path.dirname(os.path.dirname(os.path.realpath(__file__)))) ) -UTILS_DATA_DIR = os.path.join(ROOT_DIR, "data/utils", CONFIG.INSTANCE,) +UTILS_DATA_DIR = os.path.join(ROOT_DIR, "data", CONFIG.INSTANCE) with open(os.path.join(ROOT_DIR, CONFIG.USER_FILENAME), "r", encoding="utf-8") as f: USERS = load(f) @@ -105,7 +104,9 @@ def generate_data(tree: dict, user_handle: str, filename: str = "tree.json") -> "datasets": len(datasets), "datafiles": len(datafiles), } - write_json(os.path.join(UTILS_DATA_DIR, CONFIG.FILENAME_METADATA), metadata) + write_json( + os.path.join(UTILS_DATA_DIR, user_handle, CONFIG.FILENAME_METADATA), metadata + ) print(f"- Dataverses: {len(dataverses)}") print(f"- Datasets: {len(datasets)}") print(f"- Datafiles: {len(datafiles)}") @@ -146,7 +147,7 @@ def create_testdata(config_file: str, force: bool) -> None: for key, val in action["metadata"]["update"].items(): kwargs = {key: val} dv.set(kwargs) - dv_alias = dv.get()["alias"] + # dv_alias = dv.get()["alias"] resp = api.create_dataverse(action["parent-id"], dv.json(validate=False)) # Publish Dataverse @@ -247,7 +248,7 @@ def remove_testdata( if parent_data_type == "dataverse" and remove_parent: dataverses.append({"dataverse_alias": parent}) for ds in datasets: - resp = api.destroy_dataset(ds["pid"]) + api.destroy_dataset(ds["pid"]) for dv in dataverses: api.delete_dataverse(dv["dataverse_alias"])