Skip to content

Commit

Permalink
Fixed install and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
juanjol committed Nov 26, 2023
1 parent c92362e commit d166d5e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 15 deletions.
2 changes: 1 addition & 1 deletion install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ pre_install_actions:
- |
#ddev-nodisplay
cat <<-END >${DDEV_APPROOT}/docs/mkdocs.yml
site_name: Mkdocs site:
site_name: Mkdocs site
theme: material
dev_addr: '0.0.0.0:8080'
nav:
Expand Down
17 changes: 3 additions & 14 deletions tests/test.bats
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ setup() {
}

health_checks() {
# Do something useful here that verifies the add-on
# ddev exec "curl -s elasticsearch:9200" | grep "${PROJNAME}-elasticsearch"
ddev exec "curl -s https://localhost:443/"
curl -s http://mkdocs:8080 | grep -m1 "Welcome to Mkdocs"
}

teardown() {
Expand All @@ -24,20 +22,11 @@ teardown() {
[ "${TESTDIR}" != "" ] && rm -rf ${TESTDIR}
}

@test "install from directory" {
set -eu -o pipefail
cd ${TESTDIR}
echo "# ddev get ${DIR} with project ${PROJNAME} in ${TESTDIR} ($(pwd))" >&3
ddev get ${DIR}
ddev restart
health_checks
}

@test "install from release" {
set -eu -o pipefail
cd ${TESTDIR} || ( printf "unable to cd to ${TESTDIR}\n" && exit 1 )
echo "# ddev get ddev/ddev-addon-template with project ${PROJNAME} in ${TESTDIR} ($(pwd))" >&3
ddev get ddev/ddev-addon-template
echo "# ddev get metadrop/ddev-mkdocs with project ${PROJNAME} in ${TESTDIR} ($(pwd))" >&3
ddev get metadrop/ddev-mkdocs
ddev restart >/dev/null
health_checks
}
Expand Down

0 comments on commit d166d5e

Please sign in to comment.