Skip to content

Commit

Permalink
MNT Update bats test
Browse files Browse the repository at this point in the history
  • Loading branch information
Marco Hermo committed Feb 13, 2024
1 parent 26c407b commit 26cb847
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions tests/test.bats
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
setup() {
set -eu -o pipefail
export DIR="$( cd "$( dirname "$BATS_TEST_FILENAME" )" >/dev/null 2>&1 && pwd )/.."
export TESTDIR=~/tmp/test-addon-template
export TESTDIR=~/tmp/ddev-enterpise-search
mkdir -p $TESTDIR
export PROJNAME=test-addon-template
export PROJNAME=ddev-enterpise-search
export DDEV_NON_INTERACTIVE=true
ddev delete -Oy ${PROJNAME} >/dev/null 2>&1 || true
cd "${TESTDIR}"
Expand All @@ -13,8 +13,9 @@ 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/"
ddev exec "curl -s elasticsearch:9200"
ddev exec "curl -s kibana:5601"
ddev exec "curl -s enterprisesearch:3002"
}

teardown() {
Expand All @@ -36,8 +37,8 @@ teardown() {
@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 ssmarco/ddev-enterprise-search with project ${PROJNAME} in ${TESTDIR} ($(pwd))" >&3
ddev get ssmarco/ddev-enterprise-search
ddev restart >/dev/null
health_checks
}
Expand Down

0 comments on commit 26cb847

Please sign in to comment.