Skip to content

Commit

Permalink
Update n8n tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cmuench authored Jul 27, 2023
1 parent a277da1 commit 584ed49
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 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/test-netz98-n8n-addon
mkdir -p $TESTDIR
export PROJNAME=test-addon-template
export PROJNAME=test-netz98-n8n-addon
export DDEV_NON_INTERACTIVE=true
ddev delete -Oy ${PROJNAME} >/dev/null 2>&1 || true
cd "${TESTDIR}"
Expand All @@ -13,8 +13,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/"
ddev exec "curl -s http://n8n:5678" | grep n8n.io
}

teardown() {
Expand All @@ -36,9 +35,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 netz98/ddev-n8n with project ${PROJNAME} in ${TESTDIR} ($(pwd))" >&3
ddev get netz98/ddev-n8n
ddev restart >/dev/null
health_checks
}

0 comments on commit 584ed49

Please sign in to comment.