Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI integration tests + do not do a node lookup for multi-value field_member_of #849

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
task: create
host: https://islandora.traefik.me
host: https://islandora.dev
username: admin
password: password
secure_ssl_only: false
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
task: create
host: https://islandora.traefik.me
host: https://islandora.dev
username: admin
password: password
content_type: invalid_content_type
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/assets/additional_files_test/create.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
task: create
host: https://islandora.traefik.me
host: https://islandora.dev
username: admin
password: password
input_csv: create.csv
Expand Down
2 changes: 1 addition & 1 deletion tests/assets/additional_files_test/rollback.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/assets/check_test/add_media.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/assets/check_test/create.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
task: create
host: https://islandora.traefik.me
host: https://islandora.dev
username: admin
password: password
secure_ssl_only: false
2 changes: 1 addition & 1 deletion tests/assets/check_test/delete.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
task: delete
host: https://islandora.traefik.me
host: https://islandora.dev
username: admin
password: password
input_csv: delete.csv
Expand Down
2 changes: 1 addition & 1 deletion tests/assets/check_test/google_sheet.yml
Original file line number Diff line number Diff line change
@@ -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'
Expand Down
2 changes: 1 addition & 1 deletion tests/assets/check_test/update.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
task: update
host: https://islandora.traefik.me
host: https://islandora.dev
username: admin
password: password
input_csv: update.csv
Expand Down
2 changes: 1 addition & 1 deletion tests/assets/commented_csvs_test/excel.yml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
2 changes: 1 addition & 1 deletion tests/assets/commented_csvs_test/google_sheets.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/assets/commented_csvs_test/raw_csv.yml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
2 changes: 1 addition & 1 deletion tests/assets/create_from_files_test/create.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
5 changes: 5 additions & 0 deletions tests/assets/create_multi_parents/children.csv
Original file line number Diff line number Diff line change
@@ -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,
8 changes: 8 additions & 0 deletions tests/assets/create_multi_parents/children.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
task: create
host: https://islandora.dev
username: admin
password: password
input_dir: "tests/assets/create_multi_parents"
nodes_only: true
secure_ssl_only: false
input_csv: children.csv
7 changes: 7 additions & 0 deletions tests/assets/create_multi_parents/create.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
task: create
host: https://islandora.dev
username: admin
password: password
input_dir: "tests/assets/create_multi_parents"
nodes_only: true
secure_ssl_only: false
4 changes: 4 additions & 0 deletions tests/assets/create_multi_parents/metadata.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
id,title,field_model,field_member_of
001,Parent 1,Collection,
002,Parent 2,Collection,
003,Parent 3,Collection,
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/assets/create_paged_content_test/create.yml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
2 changes: 1 addition & 1 deletion tests/assets/create_test/create.yml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
2 changes: 1 addition & 1 deletion tests/assets/create_with_field_templates_test/create.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/assets/csv_row_filters_test/csv_row_filters_test.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/assets/delete_test/create.yml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
2 changes: 1 addition & 1 deletion tests/assets/delete_test/delete.yml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
2 changes: 1 addition & 1 deletion tests/assets/delimiter_test/create_tab.yml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
2 changes: 1 addition & 1 deletion tests/assets/execute_bootstrap_script_test/config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
task: create
host: https://islandora.traefik.me
host: https://islandora.dev
username: admin
password: password
media_type: document
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion tests/assets/geolocation_test/bad_geocoordinates.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/assets/google_gid_test/gid_0.yml
Original file line number Diff line number Diff line change
@@ -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'
Expand Down
2 changes: 1 addition & 1 deletion tests/assets/google_gid_test/gid_1867618389.yml
Original file line number Diff line number Diff line change
@@ -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'
Expand Down
Loading