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

Add test for config export through UI #390

Merged
merged 7 commits into from
May 1, 2024
Merged
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
8 changes: 8 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Make nightly build check latest isle-buildkit
if: github.event_name == 'schedule'
run: |-
echo "TAG=main" >> $GITHUB_OUTPUT

- name: Setup make and secrets for Windows
if: matrix.os == 'windows-latest'
run: |
Expand Down Expand Up @@ -55,6 +60,9 @@ jobs:
exit 1
fi

- name: "Make sure we can export the site config through the UI"
run: ./scripts/ci/drush-cex-ui.sh

- name: make build
run: make build
shell: bash
Expand Down
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,6 @@ login:
docker compose exec -T drupal with-contenv bash -lc "drush uli --uri=$(DOMAIN)"
echo "=============================\n"


.PHONY: init
init: generate-secrets
$(MAKE) download-default-certs
Expand Down
12 changes: 12 additions & 0 deletions build/docker-compose/docker-compose.drupal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,19 @@ services:
PHP_MEMORY_LIMIT: ${PHP_MEMORY_LIMIT}
PHP_POST_MAX_SIZE: ${PHP_POST_MAX_SIZE}
PHP_UPLOAD_MAX_FILESIZE: ${PHP_UPLOAD_MAX_FILESIZE}
NGINX_FASTCGI_CONNECT_TIMEOUT: ${PHP_MAX_EXECUTION_TIME}s
NGINX_FASTCGI_READ_TIMEOUT: ${PHP_MAX_EXECUTION_TIME}s
NGINX_FASTCGI_SEND_TIMEOUT: ${PHP_MAX_EXECUTION_TIME}s
NGINX_KEEPALIVE_TIMEOUT: ${PHP_MAX_EXECUTION_TIME}s
NGINX_PROXY_CONNECT_TIMEOUT: ${PHP_MAX_EXECUTION_TIME}s
NGINX_PROXY_READ_TIMEOUT: ${PHP_MAX_EXECUTION_TIME}s
NGINX_PROXY_SEND_TIMEOUT: ${PHP_MAX_EXECUTION_TIME}s
NGINX_SEND_TIMEOUT: ${PHP_MAX_EXECUTION_TIME}s
PHP_DEFAULT_SOCKET_TIMEOUT: ${PHP_MAX_EXECUTION_TIME}
PHP_MAX_EXECUTION_TIME: ${PHP_MAX_EXECUTION_TIME}
PHP_MAX_INPUT_TIME: ${PHP_MAX_EXECUTION_TIME}
PHP_PROCESS_CONTROL_TIMEOUT: ${PHP_MAX_EXECUTION_TIME}
PHP_REQUEST_TERMINATE_TIMEOUT: ${PHP_MAX_EXECUTION_TIME}
labels:
- traefik.enable=${EXPOSE_DRUPAL:-true}
- traefik.http.services.${COMPOSE_PROJECT_NAME-isle-dc}-drupal.loadbalancer.server.port=80
Expand Down
2 changes: 1 addition & 1 deletion sample.env
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ RESTART_POLICY=unless-stopped
PHP_MEMORY_LIMIT=256M
PHP_POST_MAX_SIZE=128M
PHP_UPLOAD_MAX_FILESIZE=128M
PHP_MAX_EXECUTION_TIME=30
PHP_MAX_EXECUTION_TIME=300

# If you're just demoing or are starting from scratch, use this.
INSTALL_EXISTING_CONFIG=false
Expand Down
21 changes: 21 additions & 0 deletions scripts/ci/drush-cex-ui.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/usr/bin/env bash

set -eou pipefail

ULI=$(make login | grep traefik)
echo "getting cookie from $ULI"
COOKIE=$(curl -L -s -c - "${ULI}")

# try exporting the config through the UI
STATUS=$(curl -s \
--cookie <(echo "$COOKIE") \
-w '%{http_code}' \
-o /dev/null \
https://islandora.traefik.me/admin/config/development/configuration/full/export-download)

# make sure the config export worked
if [ ${STATUS} -ne 200 ]; then
echo "Could not export config through Drupal UI"
echo ${STATUS}
exit 1
fi