Skip to content
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
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Exclude files from releases/tarballs
tests/ export-ignore
.github/ export-ignore
.gitattributes export-ignore
2 changes: 2 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: tests
on:
pull_request:
paths-ignore:
- "**.md"
push:
branches: [ main ]

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@

## What is the difference between this and ddev-solr

Please consider using [ddev/ddev-solr](https://github.com/ddev/ddev-solr), which runs Solr in the modern "Cloud" mode. This offers several advantages. If you are using Drupal, the biggest advantage
Please consider using [ddev/ddev-solr](https://github.com/ddev/ddev-solr), which runs Solr in the modern "Cloud" mode. This is the recommended and maintained Apache Solr integration. `ddev-solr` offers several advantages. If you are using Drupal, the biggest advantage
is that you can update the Solr Configset from the UI or with a Drush command everytime you update `search_api_solr`.

The current addon runs in "classic standalone" mode. It is probably simpler at first to setup, but comes with the added maintainance steps for configsets. Most Solr hosting service providers run "Solr Cloud" as a backend.
The current addon runs in "classic standalone" mode. It is probably simpler at first to setup, but comes with the added maintenance steps for configsets. Most Solr hosting service providers run "Solr Cloud" as a backend.

## Overview

Expand Down
25 changes: 16 additions & 9 deletions tests/test.bats
Original file line number Diff line number Diff line change
Expand Up @@ -32,26 +32,33 @@ setup() {
export DDEV_NO_INSTRUMENTATION=true
ddev delete -Oy "${PROJNAME}" >/dev/null 2>&1 || true
cd "${TESTDIR}"
run ddev config --project-name="${PROJNAME}" --project-tld=ddev.site --project-type=drupal9 --docroot=web --php-version=8.1
run ddev config --project-name="${PROJNAME}" --project-tld=ddev.site --project-type=drupal11 --docroot=web
assert_success
run ddev start -y
assert_success

echo "# Setting up Drupal project via composer ${PROJNAME} in $(pwd)" >&3
ddev composer create-project -n --no-install drupal/recommended-project:^9 >/dev/null
ddev composer require -n --no-install drush/drush:* drupal/search_api_solr >/dev/null
ddev composer config --append -- allow-plugins true
ddev composer install >/dev/null
ddev import-db --file=${DIR}/tests/testdata/db.sql.gz >/dev/null
run ddev composer create-project -n --no-install drupal/recommended-project >/dev/null
assert_success
run ddev composer require -n --no-install drush/drush:* drupal/search_api_solr >/dev/null
assert_success
run ddev composer config --append -- allow-plugins true
assert_success
run ddev composer install >/dev/null
assert_success
run ddev import-db --file=${DIR}/tests/testdata/db.sql.gz >/dev/null
assert_success
run ddev drush en -y search_api_solr
assert_success
}

health_checks() {
run ddev exec 'drush sapi-sl --format=json | jq -r .default_solr_server.status'
run ddev exec 'drush search-api:server-list --format=json | jq -r .ddev_solr_server.status'
assert_success
assert_output "enabled"

run ddev drush search-api-solr:reload default_solr_server
assert_success
# run ddev drush search-api-solr:reload ddev_solr_server
# assert_success

# Make sure the solr admin UI via HTTP from outside is redirected to HTTP /solr/
run curl -sfI http://${PROJNAME}.ddev.site:8983
Expand Down
Binary file modified tests/testdata/db.sql.gz
Binary file not shown.