Skip to content

Commit

Permalink
Fix usage of DDEV_SITENAME
Browse files Browse the repository at this point in the history
  • Loading branch information
rfay committed Mar 18, 2022
1 parent da1afe6 commit cb28736
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/test.bats
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
setup() {
set -eu -o pipefail
export DIR="$( cd "$( dirname "$BATS_TEST_FILENAME" )" >/dev/null 2>&1 && pwd )/.."
export TESTDIR=~/tmp/testelasticsearch
mkdir -p $TESTDIR
Expand All @@ -11,12 +12,14 @@ setup() {
}

teardown() {
set -eu -o pipefail
cd ${TESTDIR} || ( printf "unable to cd to ${TESTDIR}\n" && exit 1 )
ddev delete -Oy ${DDEV_SITENAME}
ddev delete -Oy ${PROJNAME} || true
[ "${TESTDIR}" != "" ] && rm -rf ${TESTDIR}
}

@test "install from directory" {
set -eu -o pipefail
cd ${TESTDIR} || ( printf "unable to cd to ${TESTDIR}\n" && exit 1 )
echo "# ddev get ${DIR} with project ${PROJNAME} in ${TESTDIR} ($(pwd))" >&3
ddev get ${DIR}
Expand All @@ -26,6 +29,7 @@ teardown() {
}

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

0 comments on commit cb28736

Please sign in to comment.