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.
Browse files
Browse the repository at this point in the history
) * Inject values from .environment into php-fpm environment, fixes #89 * Add test for wordpress-bedrock * Add capability of loading a test db (and do it with wordpress-bedrock
- Loading branch information
Showing
4 changed files
with
44 additions
and
1 deletion.
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
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
Binary file not shown.
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,32 @@ | ||
# 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 "wordpress-bedrock" { | ||
load per_test.sh | ||
template="wordpress-bedrock" | ||
for source in $PROJECT_SOURCE ddev/ddev-platformsh; do | ||
per_test_setup | ||
printf "<?php\nprint 'DB_USER=' . getenv('DB_USER') . ' DB_PASSWORD=' . getenv('DB_PASSWORD');" >web/phpinfo.php | ||
run curl -s http://${PROJNAME}.ddev.site/phpinfo.php | ||
assert_line "DB_USER=db DB_PASSWORD=db" | ||
curl -s http://${PROJNAME}.ddev.site | grep "Mindblown: a blog about" | ||
run ddev exec -s db 'echo ${DDEV_DATABASE}' | ||
assert_output "mariadb:10.4" | ||
run ddev exec 'echo $PLATFORM_RELATIONSHIPS | base64 -d | jq -r ".database[0].username"' | ||
assert_output "db" | ||
run ddev exec "php --version | awk 'NR==1 { sub(/\.[0-9]+$/, \"\", \$2); print \$2 }'" | ||
assert_output "8.1" | ||
ddev describe -j >describe.json | ||
run jq -r .raw.docroot <describe.json | ||
assert_output "web" | ||
per_test_teardown | ||
done | ||
} |