diff --git a/tests/init-template-starter.sh b/tests/init-template-starter.sh index 72dc2d7..b5e1fde 100755 --- a/tests/init-template-starter.sh +++ b/tests/init-template-starter.sh @@ -10,16 +10,21 @@ if [ ! -v ISLANDORA_TAG ] || [ "$ISLANDORA_TAG" = "" ]; then ISLANDORA_TAG=main fi +# save the site template default settings.php +# so we can overwrite it for the starter site mv drupal/rootfs/var/www/drupal/assets/patches/default_settings.txt . - curl -L "https://github.com/Islandora-Devops/islandora-starter-site/archive/refs/${ISLANDORA_STARTER_REF}.tar.gz" \ | tar --strip-components=1 -C drupal/rootfs/var/www/drupal -xz - mv default_settings.txt drupal/rootfs/var/www/drupal/assets/patches/default_settings.txt +# copy any drush scripts into the rootfs so we can run them +cp ./tests/solr.php drupal/rootfs/var/www/drupal/ + ./generate-certs.sh ./generate-secrets.sh docker compose --profile dev up -d ./tests/ping.sh + +docker compose --profile dev exec drupal-dev drush scr solr.php diff --git a/tests/solr.php b/tests/solr.php new file mode 100644 index 0000000..611b708 --- /dev/null +++ b/tests/solr.php @@ -0,0 +1,20 @@ +getBackend()->getSolrConnector()->pingServer(); + echo "Solr server connection test passed.\n"; + } + catch (Exception $e) { + echo "Solr server connection test failed: " . $e->getMessage() . "\n"; + exit(1); + } +} else { + echo "Solr server not found.\n"; + exit(1); +}