generated from ddev/ddev-addon-template
-
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ci] Remove drupal8, add drupal10 with database (#111)
- Loading branch information
Showing
3 changed files
with
48 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# Requires bats-assert and bats-support | ||
# brew tap kaos/shell && | ||
# brew install bats-core bats-assert bats-support jq mkcert yq | ||
setup() { | ||
load setup.sh | ||
} | ||
|
||
teardown() { | ||
load teardown.sh | ||
} | ||
|
||
@test "drupal10" { | ||
load per_test.sh | ||
template="drupal10" | ||
for source in $PROJECT_SOURCE ddev/ddev-platformsh; do | ||
per_test_setup | ||
|
||
ddev exec drush cr | ||
|
||
run curl -L -s http://${PROJNAME}.ddev.site/ | ||
assert_output --partial "Test of ddev-platformsh on drupal10" | ||
|
||
run ddev exec -s db 'echo ${DDEV_DATABASE}' | ||
assert_output "mariadb:10.4" | ||
run ddev exec "php --version | awk 'NR==1 { sub(/\.[0-9]+$/, \"\", \$2); print \$2 }'" | ||
assert_output "8.1" | ||
|
||
ddev exec 'touch ${PLATFORM_CACHE_DIR}/junk.txt' | ||
|
||
ddev describe -j >describe.json | ||
run jq -r .raw.docroot <describe.json | ||
assert_output "web" | ||
|
||
assert_equal "$(ddev exec 'echo $PLATFORM_ROUTES | base64 -d | jq -r "keys[0]"')" "https://${PROJNAME}.ddev.site/" | ||
ddev exec 'echo $PLATFORM_RELATIONSHIPS | base64 -d' >relationships.json | ||
echo "# PLATFORM_RELATIONSHIPS=$(cat relationships.json)" >&3 | ||
ddev exec 'echo $PLATFORM_ROUTES | base64 -d' >routes.json | ||
echo "# PLATFORM_ROUTES=$(cat routes.json)" >&3 | ||
|
||
assert_equal "$(jq -r .database[0].type <relationships.json)" "mariadb:10.4" | ||
assert_equal "$(jq -r .database[0].username <relationships.json)" "db" | ||
assert_equal "$(jq -r .database[0].password <relationships.json)" "db" | ||
assert_equal "$(jq -r .redis[0].hostname <relationships.json)" "redis" | ||
|
||
docker inspect ddev-${PROJNAME}-redis >/dev/null | ||
per_test_teardown | ||
done | ||
} |
This file was deleted.
Oops, something went wrong.
Binary file not shown.