From d9cb22c651afea41319a7fd4942ff0bb47105bfd Mon Sep 17 00:00:00 2001 From: Joe Corall Date: Thu, 14 Nov 2024 09:28:37 -0500 Subject: [PATCH 01/16] Do not do a node lookup for multi-value field_member_of --- workbench | 1 + 1 file changed, 1 insertion(+) diff --git a/workbench b/workbench index 9d20a13..061717c 100755 --- a/workbench +++ b/workbench @@ -181,6 +181,7 @@ def create(): if "field_member_of" in row.keys() and ( len(row["field_member_of"]) > 0 and value_is_numeric(row["field_member_of"]) is False + and config["subdelimiter"] not in row["field_member_of"] ): field_member_of_value_for_message = copy.copy(row["field_member_of"]) row["field_member_of"] = get_nid_from_url_alias( From 7d2f3db22db095aaed4e66e990e949a5bbe00bce Mon Sep 17 00:00:00 2001 From: Joe Corall Date: Thu, 14 Nov 2024 09:59:26 -0500 Subject: [PATCH 02/16] First pass at a unit test --- .../assets/create_multi_parents/children.csv | 5 + .../assets/create_multi_parents/children.yml | 8 + tests/assets/create_multi_parents/create.yml | 7 + .../assets/create_multi_parents/metadata.csv | 4 + tests/islandora_tests.py | 150 ++++++++++++++++++ 5 files changed, 174 insertions(+) create mode 100644 tests/assets/create_multi_parents/children.csv create mode 100644 tests/assets/create_multi_parents/children.yml create mode 100644 tests/assets/create_multi_parents/create.yml create mode 100644 tests/assets/create_multi_parents/metadata.csv diff --git a/tests/assets/create_multi_parents/children.csv b/tests/assets/create_multi_parents/children.csv new file mode 100644 index 0000000..a35bc3b --- /dev/null +++ b/tests/assets/create_multi_parents/children.csv @@ -0,0 +1,5 @@ +id,title,field_model,field_member_of +001,Child 1 & 2,Image,1|2 +002,Child 1,Image,1 +004,Child 1, 2, & 3,Image,1|2|3 +005,No parent,Image, diff --git a/tests/assets/create_multi_parents/children.yml b/tests/assets/create_multi_parents/children.yml new file mode 100644 index 0000000..da113e0 --- /dev/null +++ b/tests/assets/create_multi_parents/children.yml @@ -0,0 +1,8 @@ +task: create +host: https://islandora.traefik.me +username: admin +password: password +input_dir: "tests/assets/create_multi_parents" +nodes_only: true +secure_ssl_only: false +input_csv: children.csv diff --git a/tests/assets/create_multi_parents/create.yml b/tests/assets/create_multi_parents/create.yml new file mode 100644 index 0000000..32da1db --- /dev/null +++ b/tests/assets/create_multi_parents/create.yml @@ -0,0 +1,7 @@ +task: create +host: https://islandora.traefik.me +username: admin +password: password +input_dir: "tests/assets/create_multi_parents" +nodes_only: true +secure_ssl_only: false diff --git a/tests/assets/create_multi_parents/metadata.csv b/tests/assets/create_multi_parents/metadata.csv new file mode 100644 index 0000000..0205bf2 --- /dev/null +++ b/tests/assets/create_multi_parents/metadata.csv @@ -0,0 +1,4 @@ +id,title,field_model,field_member_of +001,Parent 1,Collection, +002,Parent 2,Collection, +003,Parent 3,Collection, diff --git a/tests/islandora_tests.py b/tests/islandora_tests.py index badee46..dad4de6 100644 --- a/tests/islandora_tests.py +++ b/tests/islandora_tests.py @@ -18,6 +18,7 @@ import unittest import time import copy +import csv sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) import workbench_utils @@ -1530,5 +1531,154 @@ def tearDown(): pass +class TestMultipleParents(unittest.TestCase): + + def setUp(self): + self.current_dir = os.path.dirname(os.path.abspath(__file__)) + self.create_config_file_path = os.path.join( + self.current_dir, "assets", "create_multi_parents", "create.yml" + ) + + yaml = YAML() + with open(self.create_config_file_path, "r") as f: + config_file_contents = f.read() + config_data = yaml.load(config_file_contents) + config = {} + for k, v in config_data.items(): + config[k] = v + self.islandora_host = config["host"] + + self.create_cmd = ["./workbench", "--config", self.create_config_file_path] + self.temp_dir = tempfile.gettempdir() + + def test_secondary_task(self): + requests.packages.urllib3.disable_warnings() + self.nids = list() + create_output = subprocess.check_output(self.create_cmd) + create_output = create_output.decode().strip() + + create_lines = create_output.splitlines() + for line in create_lines: + if "created at" in line: + nid = line.rsplit("/", 1)[-1] + nid = nid.strip(".") + self.nids.append(nid) + + self.assertEqual(len(self.nids), 3) + + # create the child CSV based on the parents created + file_path = os.path.join( + self.current_dir, "assets", "create_multi_parents", "children.csv" + ) + headers = ["id", "title", "field_model", "field_member_of"] + data = [ + { + "id": "001", + "title": "Child 1, 2", + "field_model": "Image", + "field_member_of": "|".join(map(str, self.nids[:2])), + }, + { + "id": "002", + "title": "Child 1", + "field_model": "Image", + "field_member_of": str(self.nids[0]), + }, + { + "id": "004", + "title": "Child 1, 2, 3", + "field_model": "Image", + "field_member_of": "|".join(map(str, self.nids[:3])), + }, + { + "id": "005", + "title": "No parent", + "field_model": "Image", + "field_member_of": "", + }, + ] + + # Write to CSV + with open(file_path, mode="w", newline="") as file: + writer = csv.DictWriter(file, fieldnames=headers) + writer.writeheader() + writer.writerows(data) + + self.child_config_file_path = os.path.join( + self.current_dir, "assets", "create_multi_parents", "children.yml" + ) + child_cmd = ["./workbench", "--config", self.child_config_file_path] + create_output = subprocess.check_output(child_cmd) + create_output = create_output.decode().strip() + + self.child_nids = list() + create_output = subprocess.check_output(child_cmd) + create_output = create_output.decode().strip() + + create_lines = create_output.splitlines() + for line in create_lines: + if "created at" in line: + nid = line.rsplit("/", 1)[-1] + nid = nid.strip(".") + self.child_nids.append(nid) + + for nid in self.child_nids: + node_url = self.islandora_host + "/node/" + nid + "?_format=json" + response = requests.get(node_url, verify=False) + node_json = json.loads(response.text) + if node_json["title"][0]["value"] == "Child 1, 2": + self.assertEqual(len(node_json["field_member_of"]), 2) + elif node_json["title"][0]["value"] == "Child 1": + self.assertEqual(len(node_json["field_member_of"]), 1) + elif node_json["title"][0]["value"] == "Child 1, 2, 3": + self.assertEqual(len(node_json["field_member_of"]), 3) + + def tearDown(self): + for nid in self.nids: + quick_delete_cmd = [ + "./workbench", + "--config", + self.create_config_file_path, + "--quick_delete_node", + self.islandora_host + "/node/" + nid, + ] + subprocess.check_output(quick_delete_cmd) + for nid in self.child_nids: + quick_delete_cmd = [ + "./workbench", + "--config", + self.child_config_file_path, + "--quick_delete_node", + self.islandora_host + "/node/" + nid, + ] + subprocess.check_output(quick_delete_cmd) + preprocessed_csv_path = os.path.join( + self.current_dir, + "assets", + "create_multi_parents", + "metadata.csv.preprocessed", + ) + if os.path.exists(preprocessed_csv_path): + os.remove(preprocessed_csv_path) + + secondary_preprocessed_csv_path = os.path.join( + self.temp_dir, "children.csv.preprocessed" + ) + if os.path.exists(secondary_preprocessed_csv_path): + os.remove(secondary_preprocessed_csv_path) + + map_file_path = os.path.join( + self.current_dir, "assets", "create_multi_parents", "id_to_node_map.tsv" + ) + if os.path.exists(map_file_path): + os.remove(map_file_path) + + rollback_file_path = os.path.join( + self.current_dir, "assets", "create_multi_parents", "rollback.csv" + ) + if os.path.exists(rollback_file_path): + os.remove(rollback_file_path) + + if __name__ == "__main__": unittest.main() From 1960f185cb229c5f6649dc7f7121e57884d896cb Mon Sep 17 00:00:00 2001 From: Joe Corall Date: Thu, 14 Nov 2024 10:08:11 -0500 Subject: [PATCH 03/16] Run integration tests in CI --- .github/workflows/integration-test.yml | 42 +++++++++++++++++++ .../config_01_create_short_valid.yml | 2 +- .../config_02_01_create_short_invalid.yml | 2 +- .../config_02_02_create_short_invalid.yml | 2 +- .../config_02_03_create_short_invalid.yml | 2 +- tests/assets/additional_files_test/create.yml | 2 +- .../assets/additional_files_test/rollback.yml | 2 +- ...tional_files_allow_missing_files_false.yml | 2 +- ...w_missing_files_false_with_soft_checks.yml | 2 +- ...itional_files_allow_missing_files_true.yml | 2 +- .../add_media_allow_missing_files_false.yml | 2 +- ...w_missing_files_false_with_soft_checks.yml | 2 +- .../add_media_allow_missing_files_true.yml | 2 +- .../add_media_create_nodes.yml | 2 +- ...tional_files_allow_missing_files_false.yml | 2 +- ...w_missing_files_false_with_soft_checks.yml | 2 +- ...itional_files_allow_missing_files_true.yml | 2 +- .../create_allow_missing_files_false.yml | 2 +- ...w_missing_files_false_with_soft_checks.yml | 2 +- .../create_allow_missing_files_true.yml | 2 +- tests/assets/check_test/add_media.yml | 2 +- tests/assets/check_test/create.yml | 2 +- tests/assets/check_test/delete.yml | 2 +- tests/assets/check_test/google_sheet.yml | 2 +- tests/assets/check_test/update.yml | 2 +- tests/assets/commented_csvs_test/excel.yml | 2 +- .../commented_csvs_test/google_sheets.yml | 2 +- tests/assets/commented_csvs_test/raw_csv.yml | 2 +- .../assets/create_from_files_test/create.yml | 2 +- .../assets/create_multi_parents/children.yml | 2 +- tests/assets/create_multi_parents/create.yml | 2 +- .../books.yml | 2 +- .../books_page_files_source_dir_field.yml | 2 +- .../create_paged_content_test/create.yml | 2 +- tests/assets/create_test/create.yml | 2 +- .../create.yml | 2 +- .../csv_row_filters_test.yml | 2 +- tests/assets/delete_test/create.yml | 2 +- tests/assets/delete_test/delete.yml | 2 +- tests/assets/delimiter_test/create_tab.yml | 2 +- .../execute_bootstrap_script_test/config.yml | 2 +- .../create.yml | 2 +- .../geolocation_test/bad_geocoordinates.yml | 2 +- tests/assets/google_gid_test/gid_0.yml | 2 +- .../assets/google_gid_test/gid_1867618389.yml | 2 +- .../assets/google_gid_test/gid_390347846.yml | 2 +- .../assets/google_gid_test/gid_953977578.yml | 2 +- .../header_column_mismatch_test/create.yml | 2 +- .../max_node_title_length_test/create.yml | 2 +- .../max_node_title_length_test/update.yml | 2 +- tests/assets/non_latin_text_test/create.yml | 2 +- tests/assets/non_latin_text_test/delete.yml | 2 +- .../parents_precede_children_test/bad.yml | 2 +- .../parents_precede_children_test/good.yml | 2 +- tests/assets/secondary_task_test/create.yml | 2 +- .../secondary_task_test/secondary_create.yml | 2 +- .../excel_primary.yml | 2 +- .../excel_secondary.yml | 2 +- .../google_sheets_primary.yml | 2 +- .../google_sheets_secondary.yml | 2 +- tests/assets/taxonomies_test/create.yml | 2 +- .../term_id_not_in_taxonomy.yml | 2 +- .../term_name_not_in_taxonomy.yml | 2 +- .../add_new_typed_relation.yml | 2 +- .../typed_relation_test/bad_relator.yml | 2 +- tests/assets/typed_relation_test/bad_uri.yml | 2 +- .../create_with_new_typed_relation.yml | 2 +- .../typed_relation_test/no_namespace.yml | 2 +- .../assets/update_media_test/update_media.yml | 2 +- tests/assets/update_test/create.yml | 2 +- tests/assets/update_test/delete.yml | 2 +- tests/assets/update_test/update.yml | 2 +- tests/islandora_tests.py | 18 ++++---- tests/islandora_tests_check.py | 4 +- tests/islandora_tests_hooks.py | 4 +- tests/islandora_tests_paged_content.py | 2 +- tests/unit_tests_workbench_config.py | 6 +-- 77 files changed, 130 insertions(+), 88 deletions(-) create mode 100644 .github/workflows/integration-test.yml diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml new file mode 100644 index 0000000..4504859 --- /dev/null +++ b/.github/workflows/integration-test.yml @@ -0,0 +1,42 @@ +name: Run unittests + +on: [push, pull_request] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.8", "3.9", "3.10", "3.11"] + steps: + - name: Checkout isle-site-template + uses: actions/checkout@v4 + with: + repository: Islandora-Devops/isle-site-template + + - name: Install mkcert + run: |- + curl -JLO "https://dl.filippo.io/mkcert/latest?for=linux/amd64" + chmod +x mkcert-v*-linux-amd64 + sudo cp mkcert-v*-linux-amd64 /usr/local/bin/mkcert + + - name: Start islandora-starter-site + run: ./tests/init-template-starter.sh + env: + ISLANDORA_TAG: main + ISLANDORA_STARTER_REF: "heads/main" + ISLANDORA_STARTER_OWNER: "Islandora-Devops" + + - name: Set up Python 3.11 + uses: actions/setup-python@v5 + with: + python-version: 3.11 + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python setup.py install + + - name: Run unittests + run: | + python tests/islandora_tests.py diff --git a/tests/assets/WorkbenchConfig_test/config_01_create_short_valid.yml b/tests/assets/WorkbenchConfig_test/config_01_create_short_valid.yml index 9f67012..96e7305 100644 --- a/tests/assets/WorkbenchConfig_test/config_01_create_short_valid.yml +++ b/tests/assets/WorkbenchConfig_test/config_01_create_short_valid.yml @@ -1,5 +1,5 @@ task: create -host: https://islandora.traefik.me +host: https://islandora.dev username: admin password: password secure_ssl_only: false diff --git a/tests/assets/WorkbenchConfig_test/config_02_01_create_short_invalid.yml b/tests/assets/WorkbenchConfig_test/config_02_01_create_short_invalid.yml index ddf3491..037e3af 100644 --- a/tests/assets/WorkbenchConfig_test/config_02_01_create_short_invalid.yml +++ b/tests/assets/WorkbenchConfig_test/config_02_01_create_short_invalid.yml @@ -1,5 +1,5 @@ task: create -host: https://islandora.traefik.me +host: https://islandora.dev username: admin password: password content_type: invalid_content_type diff --git a/tests/assets/WorkbenchConfig_test/config_02_02_create_short_invalid.yml b/tests/assets/WorkbenchConfig_test/config_02_02_create_short_invalid.yml index bc231db..8da25df 100644 --- a/tests/assets/WorkbenchConfig_test/config_02_02_create_short_invalid.yml +++ b/tests/assets/WorkbenchConfig_test/config_02_02_create_short_invalid.yml @@ -1,5 +1,5 @@ task: create -host: https://islandora.traefik.me +host: https://islandora.dev username: admin password: password use_node_title_for_media: true diff --git a/tests/assets/WorkbenchConfig_test/config_02_03_create_short_invalid.yml b/tests/assets/WorkbenchConfig_test/config_02_03_create_short_invalid.yml index 6a167ac..9ce033e 100644 --- a/tests/assets/WorkbenchConfig_test/config_02_03_create_short_invalid.yml +++ b/tests/assets/WorkbenchConfig_test/config_02_03_create_short_invalid.yml @@ -1,5 +1,5 @@ task: create -host: https://islandora.traefik.me +host: https://islandora.dev username: admin password: password use_node_title_for_media: true diff --git a/tests/assets/additional_files_test/create.yml b/tests/assets/additional_files_test/create.yml index 44d892f..fe0be90 100644 --- a/tests/assets/additional_files_test/create.yml +++ b/tests/assets/additional_files_test/create.yml @@ -1,5 +1,5 @@ task: create -host: https://islandora.traefik.me +host: https://islandora.dev username: admin password: password input_csv: create.csv diff --git a/tests/assets/additional_files_test/rollback.yml b/tests/assets/additional_files_test/rollback.yml index 2a3c030..48e0f67 100644 --- a/tests/assets/additional_files_test/rollback.yml +++ b/tests/assets/additional_files_test/rollback.yml @@ -1,5 +1,5 @@ task: delete -host: https://islandora.traefik.me +host: https://islandora.dev username: admin password: password input_dir: tests/assets/additional_files_test diff --git a/tests/assets/allow_missing_files_test/add_media_additional_files_allow_missing_files_false.yml b/tests/assets/allow_missing_files_test/add_media_additional_files_allow_missing_files_false.yml index efe4d42..c353c97 100644 --- a/tests/assets/allow_missing_files_test/add_media_additional_files_allow_missing_files_false.yml +++ b/tests/assets/allow_missing_files_test/add_media_additional_files_allow_missing_files_false.yml @@ -1,5 +1,5 @@ task: add_media -host: https://islandora.traefik.me +host: https://islandora.dev username: admin password: password input_dir: tests/assets/allow_missing_files_test diff --git a/tests/assets/allow_missing_files_test/add_media_additional_files_allow_missing_files_false_with_soft_checks.yml b/tests/assets/allow_missing_files_test/add_media_additional_files_allow_missing_files_false_with_soft_checks.yml index ac8a85b..105c868 100644 --- a/tests/assets/allow_missing_files_test/add_media_additional_files_allow_missing_files_false_with_soft_checks.yml +++ b/tests/assets/allow_missing_files_test/add_media_additional_files_allow_missing_files_false_with_soft_checks.yml @@ -1,5 +1,5 @@ task: add_media -host: https://islandora.traefik.me +host: https://islandora.dev username: admin password: password input_dir: tests/assets/allow_missing_files_test diff --git a/tests/assets/allow_missing_files_test/add_media_additional_files_allow_missing_files_true.yml b/tests/assets/allow_missing_files_test/add_media_additional_files_allow_missing_files_true.yml index b24170b..3543fa4 100644 --- a/tests/assets/allow_missing_files_test/add_media_additional_files_allow_missing_files_true.yml +++ b/tests/assets/allow_missing_files_test/add_media_additional_files_allow_missing_files_true.yml @@ -1,5 +1,5 @@ task: add_media -host: https://islandora.traefik.me +host: https://islandora.dev username: admin password: password input_dir: tests/assets/allow_missing_files_test diff --git a/tests/assets/allow_missing_files_test/add_media_allow_missing_files_false.yml b/tests/assets/allow_missing_files_test/add_media_allow_missing_files_false.yml index fecbe0d..358673b 100644 --- a/tests/assets/allow_missing_files_test/add_media_allow_missing_files_false.yml +++ b/tests/assets/allow_missing_files_test/add_media_allow_missing_files_false.yml @@ -1,5 +1,5 @@ task: add_media -host: https://islandora.traefik.me +host: https://islandora.dev username: admin password: password input_dir: tests/assets/allow_missing_files_test diff --git a/tests/assets/allow_missing_files_test/add_media_allow_missing_files_false_with_soft_checks.yml b/tests/assets/allow_missing_files_test/add_media_allow_missing_files_false_with_soft_checks.yml index 126ea99..5632b57 100644 --- a/tests/assets/allow_missing_files_test/add_media_allow_missing_files_false_with_soft_checks.yml +++ b/tests/assets/allow_missing_files_test/add_media_allow_missing_files_false_with_soft_checks.yml @@ -1,5 +1,5 @@ task: add_media -host: https://islandora.traefik.me +host: https://islandora.dev username: admin password: password input_dir: tests/assets/allow_missing_files_test diff --git a/tests/assets/allow_missing_files_test/add_media_allow_missing_files_true.yml b/tests/assets/allow_missing_files_test/add_media_allow_missing_files_true.yml index 7ae7532..b7967f6 100644 --- a/tests/assets/allow_missing_files_test/add_media_allow_missing_files_true.yml +++ b/tests/assets/allow_missing_files_test/add_media_allow_missing_files_true.yml @@ -1,5 +1,5 @@ task: add_media -host: https://islandora.traefik.me +host: https://islandora.dev username: admin password: password input_dir: tests/assets/allow_missing_files_test diff --git a/tests/assets/allow_missing_files_test/add_media_create_nodes.yml b/tests/assets/allow_missing_files_test/add_media_create_nodes.yml index c748393..e53df80 100644 --- a/tests/assets/allow_missing_files_test/add_media_create_nodes.yml +++ b/tests/assets/allow_missing_files_test/add_media_create_nodes.yml @@ -1,5 +1,5 @@ task: create -host: https://islandora.traefik.me +host: https://islandora.dev username: admin password: password input_dir: tests/assets/allow_missing_files_test diff --git a/tests/assets/allow_missing_files_test/create_additional_files_allow_missing_files_false.yml b/tests/assets/allow_missing_files_test/create_additional_files_allow_missing_files_false.yml index a7e589a..9710db3 100644 --- a/tests/assets/allow_missing_files_test/create_additional_files_allow_missing_files_false.yml +++ b/tests/assets/allow_missing_files_test/create_additional_files_allow_missing_files_false.yml @@ -1,5 +1,5 @@ task: create -host: https://islandora.traefik.me +host: https://islandora.dev username: admin password: password input_dir: tests/assets/allow_missing_files_test diff --git a/tests/assets/allow_missing_files_test/create_additional_files_allow_missing_files_false_with_soft_checks.yml b/tests/assets/allow_missing_files_test/create_additional_files_allow_missing_files_false_with_soft_checks.yml index 36c7330..0969eea 100644 --- a/tests/assets/allow_missing_files_test/create_additional_files_allow_missing_files_false_with_soft_checks.yml +++ b/tests/assets/allow_missing_files_test/create_additional_files_allow_missing_files_false_with_soft_checks.yml @@ -1,5 +1,5 @@ task: create -host: https://islandora.traefik.me +host: https://islandora.dev username: admin password: password input_dir: tests/assets/allow_missing_files_test diff --git a/tests/assets/allow_missing_files_test/create_additional_files_allow_missing_files_true.yml b/tests/assets/allow_missing_files_test/create_additional_files_allow_missing_files_true.yml index ecb26f0..7904b31 100644 --- a/tests/assets/allow_missing_files_test/create_additional_files_allow_missing_files_true.yml +++ b/tests/assets/allow_missing_files_test/create_additional_files_allow_missing_files_true.yml @@ -1,5 +1,5 @@ task: create -host: https://islandora.traefik.me +host: https://islandora.dev username: admin password: password input_dir: tests/assets/allow_missing_files_test diff --git a/tests/assets/allow_missing_files_test/create_allow_missing_files_false.yml b/tests/assets/allow_missing_files_test/create_allow_missing_files_false.yml index ee69185..8b4ca02 100644 --- a/tests/assets/allow_missing_files_test/create_allow_missing_files_false.yml +++ b/tests/assets/allow_missing_files_test/create_allow_missing_files_false.yml @@ -1,5 +1,5 @@ task: create -host: https://islandora.traefik.me +host: https://islandora.dev username: admin password: password input_dir: tests/assets/allow_missing_files_test diff --git a/tests/assets/allow_missing_files_test/create_allow_missing_files_false_with_soft_checks.yml b/tests/assets/allow_missing_files_test/create_allow_missing_files_false_with_soft_checks.yml index 6acea06..6072b20 100644 --- a/tests/assets/allow_missing_files_test/create_allow_missing_files_false_with_soft_checks.yml +++ b/tests/assets/allow_missing_files_test/create_allow_missing_files_false_with_soft_checks.yml @@ -1,5 +1,5 @@ task: create -host: https://islandora.traefik.me +host: https://islandora.dev username: admin password: password input_dir: tests/assets/allow_missing_files_test diff --git a/tests/assets/allow_missing_files_test/create_allow_missing_files_true.yml b/tests/assets/allow_missing_files_test/create_allow_missing_files_true.yml index 34da3bd..4a08aba 100644 --- a/tests/assets/allow_missing_files_test/create_allow_missing_files_true.yml +++ b/tests/assets/allow_missing_files_test/create_allow_missing_files_true.yml @@ -1,5 +1,5 @@ task: create -host: https://islandora.traefik.me +host: https://islandora.dev username: admin password: password input_dir: tests/assets/allow_missing_files_test diff --git a/tests/assets/check_test/add_media.yml b/tests/assets/check_test/add_media.yml index 012b659..ee64f76 100644 --- a/tests/assets/check_test/add_media.yml +++ b/tests/assets/check_test/add_media.yml @@ -1,5 +1,5 @@ task: add_media -host: https://islandora.traefik.me +host: https://islandora.dev username: admin password: password input_csv: add_media.csv diff --git a/tests/assets/check_test/create.yml b/tests/assets/check_test/create.yml index 9f67012..96e7305 100644 --- a/tests/assets/check_test/create.yml +++ b/tests/assets/check_test/create.yml @@ -1,5 +1,5 @@ task: create -host: https://islandora.traefik.me +host: https://islandora.dev username: admin password: password secure_ssl_only: false diff --git a/tests/assets/check_test/delete.yml b/tests/assets/check_test/delete.yml index c3c5ba5..ad8d122 100644 --- a/tests/assets/check_test/delete.yml +++ b/tests/assets/check_test/delete.yml @@ -1,5 +1,5 @@ task: delete -host: https://islandora.traefik.me +host: https://islandora.dev username: admin password: password input_csv: delete.csv diff --git a/tests/assets/check_test/google_sheet.yml b/tests/assets/check_test/google_sheet.yml index 1eb48c3..dbd5fdf 100644 --- a/tests/assets/check_test/google_sheet.yml +++ b/tests/assets/check_test/google_sheet.yml @@ -1,5 +1,5 @@ task: create -host: https://islandora.traefik.me +host: https://islandora.dev username: admin password: password input_csv: 'https://docs.google.com/spreadsheets/d/13Mw7gtBy1A3ZhYEAlBzmkswIdaZvX18xoRBxfbgxqWc/edit#gid=0' diff --git a/tests/assets/check_test/update.yml b/tests/assets/check_test/update.yml index 87a3ea4..64be439 100644 --- a/tests/assets/check_test/update.yml +++ b/tests/assets/check_test/update.yml @@ -1,5 +1,5 @@ task: update -host: https://islandora.traefik.me +host: https://islandora.dev username: admin password: password input_csv: update.csv diff --git a/tests/assets/commented_csvs_test/excel.yml b/tests/assets/commented_csvs_test/excel.yml index 8617d0b..7e2a4c9 100644 --- a/tests/assets/commented_csvs_test/excel.yml +++ b/tests/assets/commented_csvs_test/excel.yml @@ -1,5 +1,5 @@ task: create -host: https://islandora.traefik.me +host: https://islandora.dev username: admin password: password input_dir: "tests/assets/commented_csvs_test" diff --git a/tests/assets/commented_csvs_test/google_sheets.yml b/tests/assets/commented_csvs_test/google_sheets.yml index 4687ee3..d803790 100644 --- a/tests/assets/commented_csvs_test/google_sheets.yml +++ b/tests/assets/commented_csvs_test/google_sheets.yml @@ -1,5 +1,5 @@ task: create -host: https://islandora.traefik.me +host: https://islandora.dev username: admin password: password input_dir: tests/assets/commented_csvs_test diff --git a/tests/assets/commented_csvs_test/raw_csv.yml b/tests/assets/commented_csvs_test/raw_csv.yml index 28b66db..5025f72 100644 --- a/tests/assets/commented_csvs_test/raw_csv.yml +++ b/tests/assets/commented_csvs_test/raw_csv.yml @@ -1,5 +1,5 @@ task: create -host: https://islandora.traefik.me +host: https://islandora.dev username: admin password: password input_dir: "tests/assets/commented_csvs_test" diff --git a/tests/assets/create_from_files_test/create.yml b/tests/assets/create_from_files_test/create.yml index dbdabda..cb7955a 100644 --- a/tests/assets/create_from_files_test/create.yml +++ b/tests/assets/create_from_files_test/create.yml @@ -1,5 +1,5 @@ task: create_from_files -host: https://islandora.traefik.me +host: https://islandora.dev username: admin password: password input_dir: tests/assets/create_from_files_test/files diff --git a/tests/assets/create_multi_parents/children.yml b/tests/assets/create_multi_parents/children.yml index da113e0..401e3ca 100644 --- a/tests/assets/create_multi_parents/children.yml +++ b/tests/assets/create_multi_parents/children.yml @@ -1,5 +1,5 @@ task: create -host: https://islandora.traefik.me +host: https://islandora.dev username: admin password: password input_dir: "tests/assets/create_multi_parents" diff --git a/tests/assets/create_multi_parents/create.yml b/tests/assets/create_multi_parents/create.yml index 32da1db..7918963 100644 --- a/tests/assets/create_multi_parents/create.yml +++ b/tests/assets/create_multi_parents/create.yml @@ -1,5 +1,5 @@ task: create -host: https://islandora.traefik.me +host: https://islandora.dev username: admin password: password input_dir: "tests/assets/create_multi_parents" diff --git a/tests/assets/create_paged_content_from_directories_test/books.yml b/tests/assets/create_paged_content_from_directories_test/books.yml index bf91e4a..482d4a9 100644 --- a/tests/assets/create_paged_content_from_directories_test/books.yml +++ b/tests/assets/create_paged_content_from_directories_test/books.yml @@ -1,7 +1,7 @@ paged_content_from_directories: true paged_content_page_model_tid: http://id.loc.gov/ontologies/bibframe/part task: create -host: https://islandora.traefik.me +host: https://islandora.dev username: admin password: password input_dir: tests/assets/create_paged_content_from_directories_test/samplebooks diff --git a/tests/assets/create_paged_content_from_directories_test/books_page_files_source_dir_field.yml b/tests/assets/create_paged_content_from_directories_test/books_page_files_source_dir_field.yml index f2a8cd1..285b55d 100644 --- a/tests/assets/create_paged_content_from_directories_test/books_page_files_source_dir_field.yml +++ b/tests/assets/create_paged_content_from_directories_test/books_page_files_source_dir_field.yml @@ -1,7 +1,7 @@ paged_content_from_directories: true paged_content_page_model_tid: http://id.loc.gov/ontologies/bibframe/part task: create -host: https://islandora.traefik.me +host: https://islandora.dev username: admin password: password input_dir: tests/assets/create_paged_content_from_directories_test/samplebooks diff --git a/tests/assets/create_paged_content_test/create.yml b/tests/assets/create_paged_content_test/create.yml index 2470767..224e33f 100644 --- a/tests/assets/create_paged_content_test/create.yml +++ b/tests/assets/create_paged_content_test/create.yml @@ -1,5 +1,5 @@ task: create -host: https://islandora.traefik.me +host: https://islandora.dev username: admin password: password input_dir: "tests/assets/create_paged_content_test" diff --git a/tests/assets/create_test/create.yml b/tests/assets/create_test/create.yml index 0648735..7313a0a 100644 --- a/tests/assets/create_test/create.yml +++ b/tests/assets/create_test/create.yml @@ -1,5 +1,5 @@ task: create -host: https://islandora.traefik.me +host: https://islandora.dev username: admin password: password input_dir: "tests/assets/create_test" diff --git a/tests/assets/create_with_field_templates_test/create.yml b/tests/assets/create_with_field_templates_test/create.yml index 9fbff81..32569a5 100644 --- a/tests/assets/create_with_field_templates_test/create.yml +++ b/tests/assets/create_with_field_templates_test/create.yml @@ -1,5 +1,5 @@ task: create -host: https://islandora.traefik.me +host: https://islandora.dev username: admin password: password input_dir: tests/assets/create_with_field_templates_test diff --git a/tests/assets/csv_row_filters_test/csv_row_filters_test.yml b/tests/assets/csv_row_filters_test/csv_row_filters_test.yml index a8d5d00..2a653a5 100644 --- a/tests/assets/csv_row_filters_test/csv_row_filters_test.yml +++ b/tests/assets/csv_row_filters_test/csv_row_filters_test.yml @@ -1,5 +1,5 @@ task: create -host: https://islandora.traefik.me +host: https://islandora.dev username: admin password: password input_csv: csv_row_filters_test.csv diff --git a/tests/assets/delete_test/create.yml b/tests/assets/delete_test/create.yml index 1046e44..fa229ad 100644 --- a/tests/assets/delete_test/create.yml +++ b/tests/assets/delete_test/create.yml @@ -1,5 +1,5 @@ task: create -host: https://islandora.traefik.me +host: https://islandora.dev username: admin password: password input_dir: "tests/assets/delete_test" diff --git a/tests/assets/delete_test/delete.yml b/tests/assets/delete_test/delete.yml index 0ef55dd..24f5c68 100644 --- a/tests/assets/delete_test/delete.yml +++ b/tests/assets/delete_test/delete.yml @@ -1,5 +1,5 @@ task: delete -host: https://islandora.traefik.me +host: https://islandora.dev username: admin password: password input_dir: "tests/assets/delete_test" diff --git a/tests/assets/delimiter_test/create_tab.yml b/tests/assets/delimiter_test/create_tab.yml index 85cc393..76fee5d 100644 --- a/tests/assets/delimiter_test/create_tab.yml +++ b/tests/assets/delimiter_test/create_tab.yml @@ -1,5 +1,5 @@ task: create -host: https://islandora.traefik.me +host: https://islandora.dev username: admin password: password input_dir: "tests/assets/delimiter_test" diff --git a/tests/assets/execute_bootstrap_script_test/config.yml b/tests/assets/execute_bootstrap_script_test/config.yml index bfad787..31f8e19 100644 --- a/tests/assets/execute_bootstrap_script_test/config.yml +++ b/tests/assets/execute_bootstrap_script_test/config.yml @@ -1,5 +1,5 @@ task: create -host: https://islandora.traefik.me +host: https://islandora.dev username: admin password: password media_type: document diff --git a/tests/assets/execute_post_action_entity_script_test/create.yml b/tests/assets/execute_post_action_entity_script_test/create.yml index 72aa620..bdd6c44 100644 --- a/tests/assets/execute_post_action_entity_script_test/create.yml +++ b/tests/assets/execute_post_action_entity_script_test/create.yml @@ -1,5 +1,5 @@ task: create -host: https://islandora.traefik.me +host: https://islandora.dev username: admin password: password input_dir: tests/assets/execute_post_action_entity_script_test diff --git a/tests/assets/geolocation_test/bad_geocoordinates.yml b/tests/assets/geolocation_test/bad_geocoordinates.yml index c61dc65..0bd3dd0 100644 --- a/tests/assets/geolocation_test/bad_geocoordinates.yml +++ b/tests/assets/geolocation_test/bad_geocoordinates.yml @@ -1,5 +1,5 @@ task: create -host: https://islandora.traefik.me +host: https://islandora.dev username: admin password: password input_dir: tests/assets/geolocation_test/input_data diff --git a/tests/assets/google_gid_test/gid_0.yml b/tests/assets/google_gid_test/gid_0.yml index 1eb48c3..dbd5fdf 100644 --- a/tests/assets/google_gid_test/gid_0.yml +++ b/tests/assets/google_gid_test/gid_0.yml @@ -1,5 +1,5 @@ task: create -host: https://islandora.traefik.me +host: https://islandora.dev username: admin password: password input_csv: 'https://docs.google.com/spreadsheets/d/13Mw7gtBy1A3ZhYEAlBzmkswIdaZvX18xoRBxfbgxqWc/edit#gid=0' diff --git a/tests/assets/google_gid_test/gid_1867618389.yml b/tests/assets/google_gid_test/gid_1867618389.yml index 6bd9232..72f28f6 100644 --- a/tests/assets/google_gid_test/gid_1867618389.yml +++ b/tests/assets/google_gid_test/gid_1867618389.yml @@ -1,5 +1,5 @@ task: create -host: https://islandora.traefik.me +host: https://islandora.dev username: admin password: password input_csv: 'https://docs.google.com/spreadsheets/d/13Mw7gtBy1A3ZhYEAlBzmkswIdaZvX18xoRBxfbgxqWc/edit#gid=0' diff --git a/tests/assets/google_gid_test/gid_390347846.yml b/tests/assets/google_gid_test/gid_390347846.yml index c73fcd0..9162282 100644 --- a/tests/assets/google_gid_test/gid_390347846.yml +++ b/tests/assets/google_gid_test/gid_390347846.yml @@ -1,5 +1,5 @@ task: create -host: https://islandora.traefik.me +host: https://islandora.dev username: admin password: password input_csv: 'https://docs.google.com/spreadsheets/d/13Mw7gtBy1A3ZhYEAlBzmkswIdaZvX18xoRBxfbgxqWc/edit#gid=0' diff --git a/tests/assets/google_gid_test/gid_953977578.yml b/tests/assets/google_gid_test/gid_953977578.yml index 62e0c60..9031ec2 100644 --- a/tests/assets/google_gid_test/gid_953977578.yml +++ b/tests/assets/google_gid_test/gid_953977578.yml @@ -1,5 +1,5 @@ task: create -host: https://islandora.traefik.me +host: https://islandora.dev username: admin password: password input_csv: 'https://docs.google.com/spreadsheets/d/13Mw7gtBy1A3ZhYEAlBzmkswIdaZvX18xoRBxfbgxqWc/edit#gid=0' diff --git a/tests/assets/header_column_mismatch_test/create.yml b/tests/assets/header_column_mismatch_test/create.yml index d4fbf2d..0f8f4b7 100644 --- a/tests/assets/header_column_mismatch_test/create.yml +++ b/tests/assets/header_column_mismatch_test/create.yml @@ -1,5 +1,5 @@ task: create -host: https://islandora.traefik.me +host: https://islandora.dev username: admin password: password input_dir: "tests/assets/header_column_mismatch_test" diff --git a/tests/assets/max_node_title_length_test/create.yml b/tests/assets/max_node_title_length_test/create.yml index 9c8ad1a..07ca1f0 100644 --- a/tests/assets/max_node_title_length_test/create.yml +++ b/tests/assets/max_node_title_length_test/create.yml @@ -1,5 +1,5 @@ task: create -host: https://islandora.traefik.me +host: https://islandora.dev username: admin password: password input_dir: "tests/assets/max_node_title_length_test" diff --git a/tests/assets/max_node_title_length_test/update.yml b/tests/assets/max_node_title_length_test/update.yml index 3cda706..dcf2559 100644 --- a/tests/assets/max_node_title_length_test/update.yml +++ b/tests/assets/max_node_title_length_test/update.yml @@ -1,5 +1,5 @@ task: update -host: https://islandora.traefik.me +host: https://islandora.dev username: admin password: password input_dir: "tests/assets/max_node_title_length_test" diff --git a/tests/assets/non_latin_text_test/create.yml b/tests/assets/non_latin_text_test/create.yml index 3f728a5..73640a8 100644 --- a/tests/assets/non_latin_text_test/create.yml +++ b/tests/assets/non_latin_text_test/create.yml @@ -1,5 +1,5 @@ task: create -host: https://islandora.traefik.me +host: https://islandora.dev username: admin password: password input_dir: "tests/assets/non_latin_text_test" diff --git a/tests/assets/non_latin_text_test/delete.yml b/tests/assets/non_latin_text_test/delete.yml index de8622a..de7ef41 100644 --- a/tests/assets/non_latin_text_test/delete.yml +++ b/tests/assets/non_latin_text_test/delete.yml @@ -1,5 +1,5 @@ task: delete -host: https://islandora.traefik.me +host: https://islandora.dev username: admin password: password input_dir: "tests/assets/non_latin_text_test" diff --git a/tests/assets/parents_precede_children_test/bad.yml b/tests/assets/parents_precede_children_test/bad.yml index 0443576..d4ee9a8 100644 --- a/tests/assets/parents_precede_children_test/bad.yml +++ b/tests/assets/parents_precede_children_test/bad.yml @@ -1,5 +1,5 @@ task: create -host: https://islandora.traefik.me +host: https://islandora.dev username: admin password: password input_dir: tests/assets/parents_precede_children_test diff --git a/tests/assets/parents_precede_children_test/good.yml b/tests/assets/parents_precede_children_test/good.yml index e986d8f..a725c6a 100644 --- a/tests/assets/parents_precede_children_test/good.yml +++ b/tests/assets/parents_precede_children_test/good.yml @@ -1,5 +1,5 @@ task: create -host: https://islandora.traefik.me +host: https://islandora.dev username: admin password: password input_dir: tests/assets/parents_precede_children_test diff --git a/tests/assets/secondary_task_test/create.yml b/tests/assets/secondary_task_test/create.yml index 906c79e..5581b57 100644 --- a/tests/assets/secondary_task_test/create.yml +++ b/tests/assets/secondary_task_test/create.yml @@ -1,5 +1,5 @@ task: create -host: https://islandora.traefik.me +host: https://islandora.dev username: admin password: password input_dir: "tests/assets/secondary_task_test" diff --git a/tests/assets/secondary_task_test/secondary_create.yml b/tests/assets/secondary_task_test/secondary_create.yml index 0bf04bc..1b6e219 100644 --- a/tests/assets/secondary_task_test/secondary_create.yml +++ b/tests/assets/secondary_task_test/secondary_create.yml @@ -1,5 +1,5 @@ task: create -host: https://islandora.traefik.me +host: https://islandora.dev username: admin password: password input_dir: "tests/assets/secondary_task_test" diff --git a/tests/assets/secondary_task_with_google_sheets_and_excel_test/excel_primary.yml b/tests/assets/secondary_task_with_google_sheets_and_excel_test/excel_primary.yml index ba6096c..f8c4907 100644 --- a/tests/assets/secondary_task_with_google_sheets_and_excel_test/excel_primary.yml +++ b/tests/assets/secondary_task_with_google_sheets_and_excel_test/excel_primary.yml @@ -1,5 +1,5 @@ task: create -host: https://islandora.traefik.me +host: https://islandora.dev username: admin password: password nodes_only: true diff --git a/tests/assets/secondary_task_with_google_sheets_and_excel_test/excel_secondary.yml b/tests/assets/secondary_task_with_google_sheets_and_excel_test/excel_secondary.yml index 8facb59..a06e127 100644 --- a/tests/assets/secondary_task_with_google_sheets_and_excel_test/excel_secondary.yml +++ b/tests/assets/secondary_task_with_google_sheets_and_excel_test/excel_secondary.yml @@ -1,5 +1,5 @@ task: create -host: https://islandora.traefik.me +host: https://islandora.dev username: admin password: password nodes_only: true diff --git a/tests/assets/secondary_task_with_google_sheets_and_excel_test/google_sheets_primary.yml b/tests/assets/secondary_task_with_google_sheets_and_excel_test/google_sheets_primary.yml index 795a39b..5e36663 100644 --- a/tests/assets/secondary_task_with_google_sheets_and_excel_test/google_sheets_primary.yml +++ b/tests/assets/secondary_task_with_google_sheets_and_excel_test/google_sheets_primary.yml @@ -1,5 +1,5 @@ task: create -host: https://islandora.traefik.me +host: https://islandora.dev username: admin password: password nodes_only: true diff --git a/tests/assets/secondary_task_with_google_sheets_and_excel_test/google_sheets_secondary.yml b/tests/assets/secondary_task_with_google_sheets_and_excel_test/google_sheets_secondary.yml index 63b4aae..df80402 100644 --- a/tests/assets/secondary_task_with_google_sheets_and_excel_test/google_sheets_secondary.yml +++ b/tests/assets/secondary_task_with_google_sheets_and_excel_test/google_sheets_secondary.yml @@ -1,5 +1,5 @@ task: create -host: https://islandora.traefik.me +host: https://islandora.dev username: admin password: password nodes_only: true diff --git a/tests/assets/taxonomies_test/create.yml b/tests/assets/taxonomies_test/create.yml index 08ab103..49cfe63 100644 --- a/tests/assets/taxonomies_test/create.yml +++ b/tests/assets/taxonomies_test/create.yml @@ -1,7 +1,7 @@ task: create allow_adding_terms: true allow_missing_files: true -host: https://islandora.traefik.me +host: https://islandora.dev username: admin password: password input_dir: tests/assets/taxonomies_test diff --git a/tests/assets/taxonomies_test/term_id_not_in_taxonomy.yml b/tests/assets/taxonomies_test/term_id_not_in_taxonomy.yml index 42cd6d2..ee73c78 100644 --- a/tests/assets/taxonomies_test/term_id_not_in_taxonomy.yml +++ b/tests/assets/taxonomies_test/term_id_not_in_taxonomy.yml @@ -1,7 +1,7 @@ task: create allow_adding_terms: false allow_missing_files: true -host: https://islandora.traefik.me +host: https://islandora.dev username: admin password: password input_dir: tests/assets/taxonomies_test diff --git a/tests/assets/taxonomies_test/term_name_not_in_taxonomy.yml b/tests/assets/taxonomies_test/term_name_not_in_taxonomy.yml index 297145f..281bb32 100644 --- a/tests/assets/taxonomies_test/term_name_not_in_taxonomy.yml +++ b/tests/assets/taxonomies_test/term_name_not_in_taxonomy.yml @@ -1,7 +1,7 @@ task: create allow_adding_terms: false allow_missing_files: true -host: https://islandora.traefik.me +host: https://islandora.dev username: admin password: password input_dir: tests/assets/taxonomies_test diff --git a/tests/assets/typed_relation_test/add_new_typed_relation.yml b/tests/assets/typed_relation_test/add_new_typed_relation.yml index 61a820f..91cb2fc 100644 --- a/tests/assets/typed_relation_test/add_new_typed_relation.yml +++ b/tests/assets/typed_relation_test/add_new_typed_relation.yml @@ -1,5 +1,5 @@ task: create -host: https://islandora.traefik.me +host: https://islandora.dev username: admin password: password input_dir: tests/assets/typed_relation_test/input_data diff --git a/tests/assets/typed_relation_test/bad_relator.yml b/tests/assets/typed_relation_test/bad_relator.yml index ed8d50c..c76bbca 100644 --- a/tests/assets/typed_relation_test/bad_relator.yml +++ b/tests/assets/typed_relation_test/bad_relator.yml @@ -1,5 +1,5 @@ task: create -host: https://islandora.traefik.me +host: https://islandora.dev username: admin password: password input_dir: tests/assets/typed_relation_test/input_data diff --git a/tests/assets/typed_relation_test/bad_uri.yml b/tests/assets/typed_relation_test/bad_uri.yml index 33adb30..f67906b 100644 --- a/tests/assets/typed_relation_test/bad_uri.yml +++ b/tests/assets/typed_relation_test/bad_uri.yml @@ -1,5 +1,5 @@ task: create -host: https://islandora.traefik.me +host: https://islandora.dev username: admin password: password input_dir: tests/assets/typed_relation_test/input_data diff --git a/tests/assets/typed_relation_test/create_with_new_typed_relation.yml b/tests/assets/typed_relation_test/create_with_new_typed_relation.yml index 2ef6ffd..9b37c95 100644 --- a/tests/assets/typed_relation_test/create_with_new_typed_relation.yml +++ b/tests/assets/typed_relation_test/create_with_new_typed_relation.yml @@ -1,5 +1,5 @@ task: create -host: https://islandora.traefik.me +host: https://islandora.dev username: admin password: password input_dir: tests/assets/typed_relation_test/input_data diff --git a/tests/assets/typed_relation_test/no_namespace.yml b/tests/assets/typed_relation_test/no_namespace.yml index 24c6c02..a004146 100644 --- a/tests/assets/typed_relation_test/no_namespace.yml +++ b/tests/assets/typed_relation_test/no_namespace.yml @@ -1,5 +1,5 @@ task: create -host: https://islandora.traefik.me +host: https://islandora.dev username: admin password: password input_dir: tests/assets/typed_relation_test/input_data diff --git a/tests/assets/update_media_test/update_media.yml b/tests/assets/update_media_test/update_media.yml index b9ee59b..96b2f0b 100644 --- a/tests/assets/update_media_test/update_media.yml +++ b/tests/assets/update_media_test/update_media.yml @@ -1,5 +1,5 @@ task: update_media -host: https://islandora.traefik.me +host: https://islandora.dev username: admin password: password input_dir: "tests/assets/update_media_test" diff --git a/tests/assets/update_test/create.yml b/tests/assets/update_test/create.yml index cab7a31..ff9c273 100644 --- a/tests/assets/update_test/create.yml +++ b/tests/assets/update_test/create.yml @@ -1,5 +1,5 @@ task: create -host: https://islandora.traefik.me +host: https://islandora.dev username: admin password: password input_dir: "tests/assets/update_test" diff --git a/tests/assets/update_test/delete.yml b/tests/assets/update_test/delete.yml index e0d0f2f..1b486dd 100644 --- a/tests/assets/update_test/delete.yml +++ b/tests/assets/update_test/delete.yml @@ -1,5 +1,5 @@ task: delete -host: https://islandora.traefik.me +host: https://islandora.dev username: admin password: password input_dir: "tests/assets/update_test" diff --git a/tests/assets/update_test/update.yml b/tests/assets/update_test/update.yml index 638b987..63316d9 100644 --- a/tests/assets/update_test/update.yml +++ b/tests/assets/update_test/update.yml @@ -1,5 +1,5 @@ task: update -host: https://islandora.traefik.me +host: https://islandora.dev username: admin password: password input_dir: "tests/assets/update_test" diff --git a/tests/islandora_tests.py b/tests/islandora_tests.py index dad4de6..ba1373f 100644 --- a/tests/islandora_tests.py +++ b/tests/islandora_tests.py @@ -1,4 +1,4 @@ -"""unittest tests that require a live Drupal at https://islandora.traefik.me. In most cases, the host URL, +"""unittest tests that require a live Drupal at https://islandora.dev. In most cases, the host URL, credentials, etc. are in a configuration file referenced in the test. Files islandora_tests_check.py, islandora_tests_paged_content.py, and islandora_tests_hooks.py also @@ -54,7 +54,7 @@ def tearDown(self): "--config", self.create_config_file_path, "--quick_delete_node", - "https://islandora.traefik.me/node/" + nid, + "https://islandora.dev/node/" + nid, ] quick_delete_output = subprocess.check_output(quick_delete_cmd) @@ -100,7 +100,7 @@ def tearDown(self): "--config", self.create_config_file_path, "--quick_delete_node", - "https://islandora.traefik.me/node/" + nid, + "https://islandora.dev/node/" + nid, ] quick_delete_output = subprocess.check_output(quick_delete_cmd) @@ -165,7 +165,7 @@ def tearDown(self): "--config", self.create_config_file_path, "--quick_delete_node", - "https://islandora.traefik.me/node/" + nid, + "https://islandora.dev/node/" + nid, ] quick_delete_output = subprocess.check_output(quick_delete_cmd) @@ -243,9 +243,7 @@ def test_create(self): # Fetch each node in self.nids and check to see if its title is <= 30 chars long. All should be. for nid_to_update in self.nids: node_url = ( - "https://islandora.traefik.me/node/" - + str(self.nids[0]) - + "?_format=json" + "https://islandora.dev/node/" + str(self.nids[0]) + "?_format=json" ) node_response = requests.get(node_url, verify=False) node = json.loads(node_response.text) @@ -259,7 +257,7 @@ def tearDown(self): "--config", self.create_config_file_path, "--quick_delete_node", - "https://islandora.traefik.me/node/" + nid, + "https://islandora.dev/node/" + nid, ] quick_delete_output = subprocess.check_output(quick_delete_cmd) @@ -1622,12 +1620,14 @@ def test_secondary_task(self): nid = nid.strip(".") self.child_nids.append(nid) + self.assertEqual(len(self.child_nids), 4) + for nid in self.child_nids: node_url = self.islandora_host + "/node/" + nid + "?_format=json" response = requests.get(node_url, verify=False) node_json = json.loads(response.text) if node_json["title"][0]["value"] == "Child 1, 2": - self.assertEqual(len(node_json["field_member_of"]), 2) + self.assertEqual(len(node_json["field_member_of"]), 10) elif node_json["title"][0]["value"] == "Child 1": self.assertEqual(len(node_json["field_member_of"]), 1) elif node_json["title"][0]["value"] == "Child 1, 2, 3": diff --git a/tests/islandora_tests_check.py b/tests/islandora_tests_check.py index 856fe40..8c57ee5 100644 --- a/tests/islandora_tests_check.py +++ b/tests/islandora_tests_check.py @@ -1,4 +1,4 @@ -"""unittest tests that require a live Drupal at https://islandora.traefik.me. In most cases, the host URL, +"""unittest tests that require a live Drupal at https://islandora.dev. In most cases, the host URL, credentials, etc. are in a configuration file referenced in the test. This test file contains tests for --check. Files islandora_tests.py, islandora_tests_paged_content.py, @@ -282,7 +282,7 @@ def tearDown(self): "--config", self.create_config_file_path, "--quick_delete_node", - "https://islandora.traefik.me/node/" + nid, + "https://islandora.dev/node/" + nid, ] quick_delete_output = subprocess.check_output(quick_delete_cmd) diff --git a/tests/islandora_tests_hooks.py b/tests/islandora_tests_hooks.py index 0398162..7e66465 100644 --- a/tests/islandora_tests_hooks.py +++ b/tests/islandora_tests_hooks.py @@ -1,4 +1,4 @@ -"""unittest tests that require a live Drupal at https://islandora.traefik.me. In most cases, the host URL, +"""unittest tests that require a live Drupal at https://islandora.dev. In most cases, the host URL, credentials, etc. are in a configuration file referenced in the test. This test file contains tests for Workbench's hooks. Files islandora_tests.py, islandora_tests_paged_content.py, @@ -104,7 +104,7 @@ def tearDown(self): "--config", self.config_file_path, "--quick_delete_node", - "https://islandora.traefik.me/node/" + nid, + "https://islandora.dev/node/" + nid, ] quick_delete_output = subprocess.check_output(quick_delete_cmd) diff --git a/tests/islandora_tests_paged_content.py b/tests/islandora_tests_paged_content.py index 9822492..e06cf47 100644 --- a/tests/islandora_tests_paged_content.py +++ b/tests/islandora_tests_paged_content.py @@ -1,4 +1,4 @@ -"""unittest tests that require a live Drupal at https://islandora.traefik.me. In most cases, the host URL, +"""unittest tests that require a live Drupal at https://islandora.dev. In most cases, the host URL, credentials, etc. are in a configuration file referenced in the test. This test file contains tests for paged content. Files islandora_tests.py, islandora_tests_paged_check.py, diff --git a/tests/unit_tests_workbench_config.py b/tests/unit_tests_workbench_config.py index 3ed3e94..05d6a0c 100644 --- a/tests/unit_tests_workbench_config.py +++ b/tests/unit_tests_workbench_config.py @@ -99,7 +99,7 @@ def test_get_config_valid_config_file_01(self): # checking for config variables set in # tests/assets/execute_bootstrap_script_test/config.yml self.assertEqual(test_config_dict["task"], "create") - self.assertEqual(test_config_dict["host"], "https://islandora.traefik.me") + self.assertEqual(test_config_dict["host"], "https://islandora.dev") self.assertEqual(test_config_dict["username"], "admin") self.assertEqual(test_config_dict["password"], "password") # self.assertEqual(test_config_dict['media_type'], 'document') @@ -126,7 +126,7 @@ def test_init_validate_valid(self): test_config_obj = WorkbenchConfig(args) content_type = "islandora_object" - url = f"https://islandora.traefik.me/entity/entity_form_display/node.{content_type}.default?_format=json" + url = f"https://islandora.dev/entity/entity_form_display/node.{content_type}.default?_format=json" mocked_issue_request.assert_called_with( test_config_obj.get_config(), "GET", url ) @@ -151,7 +151,7 @@ def test_init_validate_invalid_content_type(self): test_config_obj = WorkbenchConfig(args) content_type = "invalid_content_type" - host = "https://islandora.traefik.me" + host = "https://islandora.dev" url = f"{host}/entity/entity_form_display/node.{content_type}.default?_format=json" mocked_issue_request.assert_called_with( test_config_obj.get_config(), "GET", url From 87569dc5a814428bfccd7fa6686e0e26e795022f Mon Sep 17 00:00:00 2001 From: Joe Corall Date: Thu, 14 Nov 2024 10:10:04 -0500 Subject: [PATCH 04/16] remove matrix --- .github/workflows/integration-test.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml index 4504859..21f35f5 100644 --- a/.github/workflows/integration-test.yml +++ b/.github/workflows/integration-test.yml @@ -1,13 +1,10 @@ -name: Run unittests +name: Run integration test on: [push, pull_request] jobs: build: runs-on: ubuntu-latest - strategy: - matrix: - python-version: ["3.8", "3.9", "3.10", "3.11"] steps: - name: Checkout isle-site-template uses: actions/checkout@v4 From d371d538275cb59fce0e64d350c009b2c03d18f0 Mon Sep 17 00:00:00 2001 From: Joe Corall Date: Thu, 14 Nov 2024 10:15:07 -0500 Subject: [PATCH 05/16] gotta checkout workbench --- .github/workflows/integration-test.yml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml index 21f35f5..30873a4 100644 --- a/.github/workflows/integration-test.yml +++ b/.github/workflows/integration-test.yml @@ -6,10 +6,20 @@ jobs: build: runs-on: ubuntu-latest steps: + + - name: Checkout workbench + uses: actions/checkout@v4 + + - name: Set up Python 3.11 + uses: actions/setup-python@v5 + with: + python-version: 3.11 + - name: Checkout isle-site-template uses: actions/checkout@v4 with: repository: Islandora-Devops/isle-site-template + path: isle-site-template - name: Install mkcert run: |- @@ -18,17 +28,13 @@ jobs: sudo cp mkcert-v*-linux-amd64 /usr/local/bin/mkcert - name: Start islandora-starter-site + working-directory: isle-site-template run: ./tests/init-template-starter.sh env: ISLANDORA_TAG: main ISLANDORA_STARTER_REF: "heads/main" ISLANDORA_STARTER_OWNER: "Islandora-Devops" - - name: Set up Python 3.11 - uses: actions/setup-python@v5 - with: - python-version: 3.11 - - name: Install dependencies run: | python -m pip install --upgrade pip From 485829f250e102479e35c351182b6bee08b0b28d Mon Sep 17 00:00:00 2001 From: Joe Corall Date: Thu, 14 Nov 2024 10:29:54 -0500 Subject: [PATCH 06/16] disable media standalone URL --- .github/workflows/integration-test.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml index 30873a4..638fe43 100644 --- a/.github/workflows/integration-test.yml +++ b/.github/workflows/integration-test.yml @@ -2,6 +2,10 @@ name: Run integration test on: [push, pull_request] +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: build: runs-on: ubuntu-latest @@ -40,6 +44,9 @@ jobs: python -m pip install --upgrade pip python setup.py install + # disable media standalone URL + docker exec isle-site-template-drupal-dev-1 drush config:set media.settings standalone_url FALSE -y + - name: Run unittests run: | python tests/islandora_tests.py From 67b4ff8a9b539ab252a0416cc19d18d33803857b Mon Sep 17 00:00:00 2001 From: Joe Corall Date: Thu, 14 Nov 2024 10:45:28 -0500 Subject: [PATCH 07/16] clear cache --- .github/workflows/integration-test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml index 638fe43..6da89cf 100644 --- a/.github/workflows/integration-test.yml +++ b/.github/workflows/integration-test.yml @@ -46,6 +46,7 @@ jobs: # disable media standalone URL docker exec isle-site-template-drupal-dev-1 drush config:set media.settings standalone_url FALSE -y + docker exec isle-site-template-drupal-dev-1 drush cr - name: Run unittests run: | From 7113b67e8ae7a30f7e5ab3ac8e60145e9de60965 Mon Sep 17 00:00:00 2001 From: Joe Corall Date: Thu, 14 Nov 2024 10:58:00 -0500 Subject: [PATCH 08/16] test works --- tests/islandora_tests.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/islandora_tests.py b/tests/islandora_tests.py index ba1373f..18838a2 100644 --- a/tests/islandora_tests.py +++ b/tests/islandora_tests.py @@ -1565,7 +1565,7 @@ def test_secondary_task(self): self.assertEqual(len(self.nids), 3) # create the child CSV based on the parents created - file_path = os.path.join( + self.children_csv_file_path = os.path.join( self.current_dir, "assets", "create_multi_parents", "children.csv" ) headers = ["id", "title", "field_model", "field_member_of"] @@ -1597,7 +1597,7 @@ def test_secondary_task(self): ] # Write to CSV - with open(file_path, mode="w", newline="") as file: + with open(self.children_csv_file_path, mode="w", newline="") as file: writer = csv.DictWriter(file, fieldnames=headers) writer.writeheader() writer.writerows(data) @@ -1627,7 +1627,7 @@ def test_secondary_task(self): response = requests.get(node_url, verify=False) node_json = json.loads(response.text) if node_json["title"][0]["value"] == "Child 1, 2": - self.assertEqual(len(node_json["field_member_of"]), 10) + self.assertEqual(len(node_json["field_member_of"]), 2) elif node_json["title"][0]["value"] == "Child 1": self.assertEqual(len(node_json["field_member_of"]), 1) elif node_json["title"][0]["value"] == "Child 1, 2, 3": @@ -1667,6 +1667,9 @@ def tearDown(self): if os.path.exists(secondary_preprocessed_csv_path): os.remove(secondary_preprocessed_csv_path) + if os.path.exists(self.children_csv_file_path): + os.remove(self.children_csv_file_path) + map_file_path = os.path.join( self.current_dir, "assets", "create_multi_parents", "id_to_node_map.tsv" ) From fb072e110abbd3d9d8f56e0f5d4fe571549b9de5 Mon Sep 17 00:00:00 2001 From: Joe Corall Date: Thu, 14 Nov 2024 11:02:42 -0500 Subject: [PATCH 09/16] Add other integration tests --- .github/workflows/integration-test.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml index 6da89cf..7774d3a 100644 --- a/.github/workflows/integration-test.yml +++ b/.github/workflows/integration-test.yml @@ -48,6 +48,9 @@ jobs: docker exec isle-site-template-drupal-dev-1 drush config:set media.settings standalone_url FALSE -y docker exec isle-site-template-drupal-dev-1 drush cr - - name: Run unittests + - name: Run tests run: | python tests/islandora_tests.py + python tests/islandora_tests_check.py + python tests/islandora_tests_hooks.py + python tests/islandora_tests_paged_content.py From fb75b6fce6901c075948d1a9f226e8339dc70590 Mon Sep 17 00:00:00 2001 From: Joe Corall Date: Thu, 14 Nov 2024 11:39:12 -0500 Subject: [PATCH 10/16] make them separate jobs for easier viewing --- .github/workflows/integration-test.yml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml index 7774d3a..f741937 100644 --- a/.github/workflows/integration-test.yml +++ b/.github/workflows/integration-test.yml @@ -48,9 +48,14 @@ jobs: docker exec isle-site-template-drupal-dev-1 drush config:set media.settings standalone_url FALSE -y docker exec isle-site-template-drupal-dev-1 drush cr - - name: Run tests - run: | - python tests/islandora_tests.py - python tests/islandora_tests_check.py - python tests/islandora_tests_hooks.py - python tests/islandora_tests_paged_content.py + - name: Run islandora_tests + run: python tests/islandora_tests.py + + - name: Run islandora_tests_check + run: python tests/islandora_tests_check.py + + - name: Run islandora_tests_hooks + run: python tests/islandora_tests_hooks.py + + - name: Run islandora_tests_paged_content + run: python tests/islandora_tests_paged_content.py From 3c737dbabc0f1038ed20247fc36050e0ba698e47 Mon Sep 17 00:00:00 2001 From: Joe Corall Date: Fri, 15 Nov 2024 07:48:30 -0500 Subject: [PATCH 11/16] since /tmp is hardcoded in various config files, hard code it in the tests --- .../script.py | 2 +- tests/islandora_tests.py | 30 ++++++------- tests/islandora_tests_check.py | 44 +++++++++---------- tests/islandora_tests_hooks.py | 2 +- tests/islandora_tests_paged_content.py | 6 +-- 5 files changed, 42 insertions(+), 42 deletions(-) diff --git a/tests/assets/execute_post_action_entity_script_test/script.py b/tests/assets/execute_post_action_entity_script_test/script.py index bb9d6d3..5599c3a 100755 --- a/tests/assets/execute_post_action_entity_script_test/script.py +++ b/tests/assets/execute_post_action_entity_script_test/script.py @@ -5,7 +5,7 @@ import json import tempfile -temp_dir = tempfile.gettempdir() +temp_dir = "/tmp" output_file_path = os.path.join(temp_dir, "execute_post_action_entity_script.dat") http_response_body = sys.argv[3] diff --git a/tests/islandora_tests.py b/tests/islandora_tests.py index 18838a2..f2b6265 100644 --- a/tests/islandora_tests.py +++ b/tests/islandora_tests.py @@ -129,7 +129,7 @@ def setUp(self): self.nids = list() self.output_lines = "" - self.temp_dir = tempfile.gettempdir() + self.temp_dir = "/tmp" def test_create(self): create_output = subprocess.check_output(self.create_cmd) @@ -203,7 +203,7 @@ def setUp(self): ) self.update_cmd = ["./workbench", "--config", self.update_config_file_path] - self.temp_dir = tempfile.gettempdir() + self.temp_dir = "/tmp" def test_create(self): requests.packages.urllib3.disable_warnings() @@ -298,7 +298,7 @@ def setUp(self): ) self.create_cmd = ["./workbench", "--config", self.config_file_path] - self.temp_dir = tempfile.gettempdir() + self.temp_dir = "/tmp" parser = argparse.ArgumentParser() parser.add_argument("--config") @@ -365,7 +365,7 @@ def setUp(self): ) self.create_cmd = ["./workbench", "--config", create_config_file_path] - self.temp_dir = tempfile.gettempdir() + self.temp_dir = "/tmp" self.nid_file = os.path.join(self.temp_dir, "workbenchdeletetesttnids.txt") nids = list() @@ -409,7 +409,7 @@ def setUp(self): ) self.create_cmd = ["./workbench", "--config", self.create_config_file_path] - self.temp_dir = tempfile.gettempdir() + self.temp_dir = "/tmp" self.nid_file = os.path.join(self.temp_dir, "workbenchupdatetestnids.txt") self.update_metadata_file = os.path.join( self.current_dir, "assets", "update_test", "workbenchupdatetest.csv" @@ -506,7 +506,7 @@ def setUp(self): config[k] = v self.islandora_host = config["host"] - self.temp_dir = tempfile.gettempdir() + self.temp_dir = "/tmp" self.nid_file = os.path.join( self.temp_dir, "workbenchcreatenonlatintestnids.txt" ) @@ -594,7 +594,7 @@ def setUp(self): self.islandora_host = config["host"] self.create_cmd = ["./workbench", "--config", self.create_config_file_path] - self.temp_dir = tempfile.gettempdir() + self.temp_dir = "/tmp" def test_secondary_task(self): requests.packages.urllib3.disable_warnings() @@ -698,7 +698,7 @@ def setUp(self): self.islandora_host = config["host"] self.create_cmd = ["./workbench", "--config", self.create_config_file_path] - self.temp_dir = tempfile.gettempdir() + self.temp_dir = "/tmp" def test_secondary_task_with_google_sheet(self): requests.packages.urllib3.disable_warnings() @@ -796,7 +796,7 @@ def setUp(self): self.islandora_host = config["host"] self.create_cmd = ["./workbench", "--config", self.create_config_file_path] - self.temp_dir = tempfile.gettempdir() + self.temp_dir = "/tmp" def test_secondary_task_with_excel(self): requests.packages.urllib3.disable_warnings() @@ -899,7 +899,7 @@ def setUp(self): create_output = subprocess.check_output(self.create_cmd) create_output = create_output.decode().strip() - self.temp_dir = tempfile.gettempdir() + self.temp_dir = "/tmp" self.rollback_file_path = os.path.join( self.current_dir, "assets", "additional_files_test", "rollback.csv" @@ -1019,7 +1019,7 @@ def setUp(self): self.rollback_file_path = os.path.join( self.current_dir, "assets", "allow_missing_files_test", "rollback.csv" ) - self.temp_dir = tempfile.gettempdir() + self.temp_dir = "/tmp" self.nids = list() yaml = YAML() @@ -1109,7 +1109,7 @@ def setUp(self): self.rollback_file_path = os.path.join( self.current_dir, "assets", "allow_missing_files_test", "rollback.csv" ) - self.temp_dir = tempfile.gettempdir() + self.temp_dir = "/tmp" self.nids = list() yaml = YAML() @@ -1225,7 +1225,7 @@ def setUp(self): "allow_missing_files_test", "add_media_additional_files_allow_missing_files_false.log", ) - self.temp_dir = tempfile.gettempdir() + self.temp_dir = "/tmp" self.nids = list() yaml = YAML() @@ -1393,7 +1393,7 @@ def setUp(self): "allow_missing_files_test", "add_media_additional_files_allow_missing_files_true.log", ) - self.temp_dir = tempfile.gettempdir() + self.temp_dir = "/tmp" self.nids = list() yaml = YAML() @@ -1547,7 +1547,7 @@ def setUp(self): self.islandora_host = config["host"] self.create_cmd = ["./workbench", "--config", self.create_config_file_path] - self.temp_dir = tempfile.gettempdir() + self.temp_dir = "/tmp" def test_secondary_task(self): requests.packages.urllib3.disable_warnings() diff --git a/tests/islandora_tests_check.py b/tests/islandora_tests_check.py index 8c57ee5..bcbe046 100644 --- a/tests/islandora_tests_check.py +++ b/tests/islandora_tests_check.py @@ -87,7 +87,7 @@ def setUp(self): config_file_path = os.path.join( self.current_dir, "assets", "check_test", "update.yml" ) - self.temp_dir = tempfile.gettempdir() + self.temp_dir = "/tmp" cmd = ["./workbench", "--config", config_file_path, "--check"] output = subprocess.check_output(cmd) @@ -113,7 +113,7 @@ def setUp(self): config_file_path = os.path.join( self.current_dir, "assets", "check_test", "delete.yml" ) - self.temp_dir = tempfile.gettempdir() + self.temp_dir = "/tmp" cmd = ["./workbench", "--config", config_file_path, "--check"] output = subprocess.check_output(cmd) @@ -139,7 +139,7 @@ def setUp(self): config_file_path = os.path.join( self.current_dir, "assets", "check_test", "add_media.yml" ) - self.temp_dir = tempfile.gettempdir() + self.temp_dir = "/tmp" cmd = ["./workbench", "--config", config_file_path, "--check"] output = subprocess.check_output(cmd) @@ -165,7 +165,7 @@ def setUp(self): config_file_path = os.path.join( self.current_dir, "assets", "max_node_title_length_test", "create.yml" ) - self.temp_dir = tempfile.gettempdir() + self.temp_dir = "/tmp" cmd = ["./workbench", "--config", config_file_path, "--check"] output = subprocess.check_output(cmd) @@ -225,7 +225,7 @@ def setUp(self): "--check", ] - self.temp_dir = tempfile.gettempdir() + self.temp_dir = "/tmp" def test_for_too_long_titles(self): create_output = subprocess.check_output(self.create_cmd) @@ -311,7 +311,7 @@ def tearDown(self): class TestTypedRelationBadRelatorCheck(unittest.TestCase): def setUp(self): - self.temp_dir = tempfile.gettempdir() + self.temp_dir = "/tmp" def test_bad_relator_check_fail(self): self.current_dir = os.path.dirname(os.path.abspath(__file__)) @@ -351,7 +351,7 @@ def tearDown(self): class TestTypedRelationBadUriCheck(unittest.TestCase): def setUp(self): - self.temp_dir = tempfile.gettempdir() + self.temp_dir = "/tmp" def test_bad_uri_check_fail(self): self.current_dir = os.path.dirname(os.path.abspath(__file__)) @@ -397,7 +397,7 @@ def setUp(self): cmd = ["./workbench", "--config", config_file_path, "--check"] output = subprocess.check_output(cmd) self.output = output.decode().strip() - self.temp_dir = tempfile.gettempdir() + self.temp_dir = "/tmp" def test_new_typed_relation_check(self): self.assertRegex(self.output, "new terms will be created as noted", "") @@ -423,7 +423,7 @@ def tearDown(self): class TestTypedRelationNoNamespaceCheck(unittest.TestCase): def setUp(self): - self.temp_dir = tempfile.gettempdir() + self.temp_dir = "/tmp" def test_no_namespace_check_fail(self): self.current_dir = os.path.dirname(os.path.abspath(__file__)) @@ -466,7 +466,7 @@ def setUp(self): cmd = ["./workbench", "--config", config_file_path, "--check"] output = subprocess.check_output(cmd) self.output = output.decode().strip() - self.temp_dir = tempfile.gettempdir() + self.temp_dir = "/tmp" def test_delimiter_check(self): self.assertRegex(self.output, "input data appear to be valid", "") @@ -482,7 +482,7 @@ def tearDown(self): class TestGeolocationCheck(unittest.TestCase): def setUp(self): - self.temp_dir = tempfile.gettempdir() + self.temp_dir = "/tmp" def test_geolocation_check(self): self.current_dir = os.path.dirname(os.path.abspath(__file__)) @@ -508,7 +508,7 @@ def tearDown(self): class TestHeaderColumnMismatchCheck(unittest.TestCase): def setUp(self): - self.temp_dir = tempfile.gettempdir() + self.temp_dir = "/tmp" def test_header_column_mismatch_fail(self): self.current_dir = os.path.dirname(os.path.abspath(__file__)) @@ -547,7 +547,7 @@ def setUp(self): cmd = ["./workbench", "--config", config_file_path, "--check"] output = subprocess.check_output(cmd) self.output = output.decode().strip() - self.temp_dir = tempfile.gettempdir() + self.temp_dir = "/tmp" def test_create_with_field_templates_check(self): self.assertRegex( @@ -565,7 +565,7 @@ class TestCommentedCsvs(unittest.TestCase): def test_commented_csv(self): current_dir = os.path.dirname(os.path.abspath(__file__)) - self.temp_dir = tempfile.gettempdir() + self.temp_dir = "/tmp" config_file_path = os.path.join( current_dir, "assets", "commented_csvs_test", "raw_csv.yml" @@ -636,7 +636,7 @@ def setUp(self): self.create_cmd = ["./workbench", "--config", self.taxonomies_config_file_path] - self.temp_dir = tempfile.gettempdir() + self.temp_dir = "/tmp" self.nids = list() nids = list() @@ -774,7 +774,7 @@ def tearDown(self): class TestGoogleGid(unittest.TestCase): def setUp(self): - self.temp_dir = tempfile.gettempdir() + self.temp_dir = "/tmp" def test_google_gid(self): current_dir = os.path.dirname(os.path.abspath(__file__)) @@ -826,7 +826,7 @@ class TestParentsPrecedeChildren(unittest.TestCase): def setUp(self): self.current_dir = os.path.dirname(os.path.abspath(__file__)) - self.temp_dir = tempfile.gettempdir() + self.temp_dir = "/tmp" def test_good_csv(self): config_file_path = os.path.join( @@ -860,7 +860,7 @@ class TestCreateAllowMissingFiles(unittest.TestCase): def setUp(self): self.current_dir = os.path.dirname(os.path.abspath(__file__)) - self.temp_dir = tempfile.gettempdir() + self.temp_dir = "/tmp" self.false_log_file_path = os.path.join( self.current_dir, "assets", @@ -978,7 +978,7 @@ class TestCreateAllowMissingFilesWithAdditionalFiles(unittest.TestCase): def setUp(self): self.current_dir = os.path.dirname(os.path.abspath(__file__)) - self.temp_dir = tempfile.gettempdir() + self.temp_dir = "/tmp" self.false_log_file_path = os.path.join( self.current_dir, "assets", @@ -1153,7 +1153,7 @@ def setUp(self): self.add_media_csv_file_path = os.path.join( self.current_dir, "assets", "allow_missing_files_test", "add_media.csv" ) - self.temp_dir = tempfile.gettempdir() + self.temp_dir = "/tmp" self.nids = list() yaml = YAML() @@ -1381,7 +1381,7 @@ def setUp(self): "allow_missing_files_test", "add_media_additional_files.csv", ) - self.temp_dir = tempfile.gettempdir() + self.temp_dir = "/tmp" self.nids = list() yaml = YAML() @@ -1575,7 +1575,7 @@ def setUp(self): "csv_row_filters_test", "csv_row_filters_test.yml", ) - self.temp_dir = tempfile.gettempdir() + self.temp_dir = "/tmp" self.preprocessed_csv_file_path = os.path.join( self.temp_dir, "csv_row_filters_test.csv.preprocessed" ) diff --git a/tests/islandora_tests_hooks.py b/tests/islandora_tests_hooks.py index 7e66465..7c76e6f 100644 --- a/tests/islandora_tests_hooks.py +++ b/tests/islandora_tests_hooks.py @@ -78,7 +78,7 @@ def setUp(self): "execute_post_action_entity_script_test", "script.py", ) - self.temp_dir = tempfile.gettempdir() + self.temp_dir = "/tmp" self.output_file_path = os.path.join( self.temp_dir, "execute_post_action_entity_script.dat" ) diff --git a/tests/islandora_tests_paged_content.py b/tests/islandora_tests_paged_content.py index e06cf47..9e0154c 100644 --- a/tests/islandora_tests_paged_content.py +++ b/tests/islandora_tests_paged_content.py @@ -39,7 +39,7 @@ def setUp(self): self.create_cmd = ["./workbench", "--config", self.create_config_file_path] - self.temp_dir = tempfile.gettempdir() + self.temp_dir = "/tmp" def test_create_paged_content(self): requests.packages.urllib3.disable_warnings() @@ -124,7 +124,7 @@ def setUp(self): self.create_cmd = ["./workbench", "--config", self.create_config_file_path] - self.temp_dir = tempfile.gettempdir() + self.temp_dir = "/tmp" def test_create_paged_content_from_directories(self): requests.packages.urllib3.disable_warnings() @@ -233,7 +233,7 @@ def setUp(self): self.create_cmd = ["./workbench", "--config", self.create_config_file_path] - self.temp_dir = tempfile.gettempdir() + self.temp_dir = "/tmp" def test_create_paged_content_from_directories(self): requests.packages.urllib3.disable_warnings() From 6d9a948a783c05b631ba338bfb802a2c844132aa Mon Sep 17 00:00:00 2001 From: Joe Corall Date: Fri, 15 Nov 2024 07:52:01 -0500 Subject: [PATCH 12/16] do not add non-nids to CSVs --- tests/islandora_tests.py | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/tests/islandora_tests.py b/tests/islandora_tests.py index f2b6265..374f736 100644 --- a/tests/islandora_tests.py +++ b/tests/islandora_tests.py @@ -372,14 +372,15 @@ def setUp(self): create_output = subprocess.check_output(self.create_cmd) create_output = create_output.decode().strip() create_lines = create_output.splitlines() - with open(self.nid_file, "a") as fh: + with open(self.nid_file, "w") as fh: fh.write("node_id\n") for line in create_lines: if "created at" in line: nid = line.rsplit("/", 1)[-1] nid = nid.strip(".") - nids.append(nid) - fh.write(nid + "\n") + if workbench_utils.value_is_numeric(nid): + nids.append(nid) + fh.write(nid + "\n") def test_delete(self): delete_config_file_path = os.path.join( @@ -429,14 +430,15 @@ def setUp(self): create_output = create_output.decode().strip() create_lines = create_output.splitlines() - with open(self.nid_file, "a") as nids_fh: + with open(self.nid_file, "w") as nids_fh: nids_fh.write("node_id\n") for line in create_lines: if "created at" in line: nid = line.rsplit("/", 1)[-1] nid = nid.strip(".") - nids_fh.write(nid + "\n") - self.nids.append(nid) + if workbench_utils.value_is_numeric(nid): + nids_fh.write(nid + "\n") + self.nids.append(nid) # Add some values to the update CSV file to test against. with open(self.update_metadata_file, "a") as update_fh: @@ -520,14 +522,15 @@ def test_create_with_non_latin_text(self): create_output = subprocess.check_output(self.create_cmd) create_output = create_output.decode().strip() create_lines = create_output.splitlines() - with open(self.nid_file, "a") as fh: + with open(self.nid_file, "w") as fh: fh.write("node_id\n") for line in create_lines: if "created at" in line: nid = line.rsplit("/", 1)[-1] nid = nid.strip(".") - nids.append(nid) - fh.write(nid + "\n") + if workbench_utils.value_is_numeric(nid): + nids.append(nid) + fh.write(nid + "\n") self.assertEqual(len(nids), 3) From 36ad535d927cb7b7df8eb454ce18ed880691a5cc Mon Sep 17 00:00:00 2001 From: Joe Corall Date: Fri, 15 Nov 2024 07:52:21 -0500 Subject: [PATCH 13/16] Per Mark, remove test --- .github/workflows/integration-test.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml index f741937..3c8e2ec 100644 --- a/.github/workflows/integration-test.yml +++ b/.github/workflows/integration-test.yml @@ -51,9 +51,6 @@ jobs: - name: Run islandora_tests run: python tests/islandora_tests.py - - name: Run islandora_tests_check - run: python tests/islandora_tests_check.py - - name: Run islandora_tests_hooks run: python tests/islandora_tests_hooks.py From ceda06df7a352f7ff9ae2a58b0c5794ea9508d40 Mon Sep 17 00:00:00 2001 From: Joe Corall Date: Fri, 15 Nov 2024 08:26:36 -0500 Subject: [PATCH 14/16] Add site template CA for paged content test --- .github/workflows/integration-test.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml index 3c8e2ec..576e30b 100644 --- a/.github/workflows/integration-test.yml +++ b/.github/workflows/integration-test.yml @@ -9,6 +9,8 @@ concurrency: jobs: build: runs-on: ubuntu-latest + env: + REQUESTS_CA_BUNDLE: ${{ github.workspace }}/isle-site-template/certs/rootCA.pem steps: - name: Checkout workbench From 5d5b7802333f3e275c7f0502b0ce988bf30c2a24 Mon Sep 17 00:00:00 2001 From: Joe Corall Date: Fri, 15 Nov 2024 08:39:18 -0500 Subject: [PATCH 15/16] Update integration-test.yml --- .github/workflows/integration-test.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml index 576e30b..e4805e7 100644 --- a/.github/workflows/integration-test.yml +++ b/.github/workflows/integration-test.yml @@ -9,8 +9,7 @@ concurrency: jobs: build: runs-on: ubuntu-latest - env: - REQUESTS_CA_BUNDLE: ${{ github.workspace }}/isle-site-template/certs/rootCA.pem + steps: - name: Checkout workbench @@ -58,3 +57,5 @@ jobs: - name: Run islandora_tests_paged_content run: python tests/islandora_tests_paged_content.py + env: + REQUESTS_CA_BUNDLE: ${{ github.workspace }}/isle-site-template/certs/rootCA.pem From 846041b3c7d61963044d4b788df325a39a6a061c Mon Sep 17 00:00:00 2001 From: Joe Corall Date: Fri, 15 Nov 2024 08:55:30 -0500 Subject: [PATCH 16/16] Change order from fastest to slowest for quicker feedback on islandora site failure --- .github/workflows/integration-test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml index e4805e7..339de06 100644 --- a/.github/workflows/integration-test.yml +++ b/.github/workflows/integration-test.yml @@ -49,9 +49,6 @@ jobs: docker exec isle-site-template-drupal-dev-1 drush config:set media.settings standalone_url FALSE -y docker exec isle-site-template-drupal-dev-1 drush cr - - name: Run islandora_tests - run: python tests/islandora_tests.py - - name: Run islandora_tests_hooks run: python tests/islandora_tests_hooks.py @@ -59,3 +56,6 @@ jobs: run: python tests/islandora_tests_paged_content.py env: REQUESTS_CA_BUNDLE: ${{ github.workspace }}/isle-site-template/certs/rootCA.pem + + - name: Run islandora_tests + run: python tests/islandora_tests.py