Skip to content

Commit 7049d08

Browse files
authored
test: update to use drupal11 (#56)
1 parent 52e5c83 commit 7049d08

File tree

5 files changed

+24
-11
lines changed

5 files changed

+24
-11
lines changed

.gitattributes

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Exclude files from releases/tarballs
2+
tests/ export-ignore
3+
.github/ export-ignore
4+
.gitattributes export-ignore

.github/workflows/tests.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
name: tests
22
on:
33
pull_request:
4+
paths-ignore:
5+
- "**.md"
46
push:
57
branches: [ main ]
68

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77

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

10-
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
10+
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
1111
is that you can update the Solr Configset from the UI or with a Drush command everytime you update `search_api_solr`.
1212

13-
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.
13+
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.
1414

1515
## Overview
1616

tests/test.bats

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,26 +32,33 @@ setup() {
3232
export DDEV_NO_INSTRUMENTATION=true
3333
ddev delete -Oy "${PROJNAME}" >/dev/null 2>&1 || true
3434
cd "${TESTDIR}"
35-
run ddev config --project-name="${PROJNAME}" --project-tld=ddev.site --project-type=drupal9 --docroot=web --php-version=8.1
35+
run ddev config --project-name="${PROJNAME}" --project-tld=ddev.site --project-type=drupal11 --docroot=web
3636
assert_success
3737
run ddev start -y
3838
assert_success
3939

4040
echo "# Setting up Drupal project via composer ${PROJNAME} in $(pwd)" >&3
41-
ddev composer create-project -n --no-install drupal/recommended-project:^9 >/dev/null
42-
ddev composer require -n --no-install drush/drush:* drupal/search_api_solr >/dev/null
43-
ddev composer config --append -- allow-plugins true
44-
ddev composer install >/dev/null
45-
ddev import-db --file=${DIR}/tests/testdata/db.sql.gz >/dev/null
41+
run ddev composer create-project -n --no-install drupal/recommended-project >/dev/null
42+
assert_success
43+
run ddev composer require -n --no-install drush/drush:* drupal/search_api_solr >/dev/null
44+
assert_success
45+
run ddev composer config --append -- allow-plugins true
46+
assert_success
47+
run ddev composer install >/dev/null
48+
assert_success
49+
run ddev import-db --file=${DIR}/tests/testdata/db.sql.gz >/dev/null
50+
assert_success
51+
run ddev drush en -y search_api_solr
52+
assert_success
4653
}
4754

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

53-
run ddev drush search-api-solr:reload default_solr_server
54-
assert_success
60+
# run ddev drush search-api-solr:reload ddev_solr_server
61+
# assert_success
5562

5663
# Make sure the solr admin UI via HTTP from outside is redirected to HTTP /solr/
5764
run curl -sfI http://${PROJNAME}.ddev.site:8983

tests/testdata/db.sql.gz

8.94 KB
Binary file not shown.

0 commit comments

Comments
 (0)