Skip to content

Commit

Permalink
Move test into bash script
Browse files Browse the repository at this point in the history
  • Loading branch information
joecorall committed Apr 27, 2024
1 parent 6e07f26 commit ae61925
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 22 deletions.
23 changes: 1 addition & 22 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,29 +61,8 @@ jobs:
fi
- name: "Make sure we can export the site config through the UI"
run: |-
# login as admin
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
run: ./scripts/ci/drush-cex-ui.sh

# see if /tmp/config.tar.gz is still left around
docker compose exec -T drupal with-contenv bash -lc "ls -l /tmp"
- name: make build
run: make build
shell: bash
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

0 comments on commit ae61925

Please sign in to comment.