diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4074b23..c945f89 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -14,7 +14,12 @@ jobs: CMD_BUILD: pyinstaller workbench --onefile --name workbench-macos OUT_FILE_NAME: workbench-macos ASSET_MIME: application/zip - - os: ubuntu-latest + - os: ubuntu-22.04 + TARGET: linux + CMD_BUILD: pyinstaller workbench --onefile --name workbench-linux + OUT_FILE_NAME: workbench-linux + ASSET_MIME: application/zip + - os: ubuntu-24.04 TARGET: linux CMD_BUILD: pyinstaller workbench --onefile --name workbench-linux OUT_FILE_NAME: workbench-linux diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml new file mode 100644 index 0000000..339de06 --- /dev/null +++ b/.github/workflows/integration-test.yml @@ -0,0 +1,61 @@ +name: Run integration test + +on: [push, pull_request] + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +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: |- + 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 + 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: Install dependencies + run: | + 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 + docker exec isle-site-template-drupal-dev-1 drush cr + + - 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 + env: + REQUESTS_CA_BUNDLE: ${{ github.workspace }}/isle-site-template/certs/rootCA.pem + + - name: Run islandora_tests + run: python tests/islandora_tests.py diff --git a/.github/workflows/unittests.yml b/.github/workflows/unittests.yml index 6154aea..885f50b 100644 --- a/.github/workflows/unittests.yml +++ b/.github/workflows/unittests.yml @@ -7,8 +7,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.8", "3.9", "3.10", "3.11"] - + python-version: ["3.9", "3.10", "3.11"] steps: - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} 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_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/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/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 badee46..c7e0b41 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 @@ -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 @@ -53,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) @@ -99,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) @@ -128,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) @@ -164,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) @@ -202,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() @@ -242,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) @@ -258,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) @@ -299,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") @@ -366,21 +365,22 @@ 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() 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( @@ -410,7 +410,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" @@ -430,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: @@ -507,7 +508,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" ) @@ -521,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) @@ -595,7 +597,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() @@ -699,7 +701,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() @@ -797,7 +799,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() @@ -900,7 +902,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" @@ -1020,7 +1022,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() @@ -1110,7 +1112,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() @@ -1226,7 +1228,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() @@ -1394,7 +1396,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() diff --git a/tests/islandora_tests_check.py b/tests/islandora_tests_check.py index 856fe40..bcbe046 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, @@ -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) @@ -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) @@ -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 0398162..7c76e6f 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, @@ -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" ) @@ -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..9e0154c 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, @@ -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() 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