diff --git a/docker-compose/setup-script/tests/configure/setup.sh b/docker-compose/setup-script/tests/configure/setup.sh old mode 100644 new mode 100755 index 4763483ff7..ef17b873b7 --- a/docker-compose/setup-script/tests/configure/setup.sh +++ b/docker-compose/setup-script/tests/configure/setup.sh @@ -1,5 +1,7 @@ #!/bin/bash +WORKING_DIR=$(dirname "$0") + if [ -z "$NOCO_HOME" ]; then NOCO_HOME="${HOME}/.nocodb" fi @@ -9,10 +11,12 @@ if [ -d "$NOCO_HOME" ]; then docker compose down fi -cd /tmp || exit +cd "$WORKING_DIR" || exit rm -rf "$NOCO_HOME" -../noco.sh <<< $'\n\nN\n' +if [ "$1" = "setup" ]; then + ../../noco.sh <<< $'\n\nN\n' -cd "$NOCO_HOME" || exit -docker compose down \ No newline at end of file + cd "$NOCO_HOME" || exit + docker compose down +fi \ No newline at end of file diff --git a/docker-compose/setup-script/tests/configure/start.bats b/docker-compose/setup-script/tests/configure/start.bats old mode 100644 new mode 100755 index ea903e004f..66d3736ea3 --- a/docker-compose/setup-script/tests/configure/start.bats +++ b/docker-compose/setup-script/tests/configure/start.bats @@ -7,12 +7,12 @@ WORKING_DIR="$(pwd)" setup() { cd "${WORKING_DIR}" || exit 1 - setup.sh + ./setup.sh "setup" } teardown() { cd "${WORKING_DIR}" || exit 1 - setup.sh + ./setup.sh } @test "Check Redis, WatchTower and NocoDB are up" { diff --git a/docker-compose/setup-script/tests/install/default.bats b/docker-compose/setup-script/tests/install/default.bats old mode 100644 new mode 100755 index a0e2c6cb78..8edb902326 --- a/docker-compose/setup-script/tests/install/default.bats +++ b/docker-compose/setup-script/tests/install/default.bats @@ -7,12 +7,12 @@ WORKING_DIR="$(pwd)" setup() { cd "${WORKING_DIR}" || exit 1 - setup.sh + ./setup.sh } teardown() { cd "${WORKING_DIR}" || exit 1 - setup.sh + ./setup.sh } @test "Check Redis, WatchTower and NocoDB are up" { diff --git a/docker-compose/setup-script/tests/install/ip.bats b/docker-compose/setup-script/tests/install/ip.bats old mode 100644 new mode 100755 index 41214a3c6d..37be0cf4ec --- a/docker-compose/setup-script/tests/install/ip.bats +++ b/docker-compose/setup-script/tests/install/ip.bats @@ -7,12 +7,12 @@ WORKING_DIR="$(pwd)" setup() { cd "${WORKING_DIR}" || exit 1 - setup.sh + ./setup.sh } teardown() { cd "${WORKING_DIR}" || exit 1 - setup.sh + ./setup.sh } @test "Check Redis, WatchTower and NocoDB are up with custom ip" { diff --git a/docker-compose/setup-script/tests/install/redis.bats b/docker-compose/setup-script/tests/install/redis.bats old mode 100644 new mode 100755 index c91e196bfb..4c1ed94030 --- a/docker-compose/setup-script/tests/install/redis.bats +++ b/docker-compose/setup-script/tests/install/redis.bats @@ -7,12 +7,12 @@ WORKING_DIR="$(pwd)" setup() { cd "${WORKING_DIR}" || exit 1 - setup.sh + ./setup.sh } teardown() { cd "${WORKING_DIR}" || exit 1 - setup.sh + ./setup.sh } @test "Check Redis is enabled when specified" { diff --git a/docker-compose/setup-script/tests/install/scale.bats b/docker-compose/setup-script/tests/install/scale.bats old mode 100644 new mode 100755 index c343bff930..3adb94e95a --- a/docker-compose/setup-script/tests/install/scale.bats +++ b/docker-compose/setup-script/tests/install/scale.bats @@ -7,12 +7,12 @@ WORKING_DIR="$(pwd)" setup() { cd "${WORKING_DIR}" || exit 1 - setup.sh + ./setup.sh } teardown() { cd "${WORKING_DIR}" || exit 1 - setup.sh + ./setup.sh } @test "Check if two instances of NoCoDB can be run" { diff --git a/docker-compose/setup-script/tests/install/watchtower.bats b/docker-compose/setup-script/tests/install/watchtower.bats old mode 100644 new mode 100755 index 3dd107ca7c..b66a1936eb --- a/docker-compose/setup-script/tests/install/watchtower.bats +++ b/docker-compose/setup-script/tests/install/watchtower.bats @@ -7,12 +7,12 @@ WORKING_DIR="$(pwd)" setup() { cd "${WORKING_DIR}" || exit 1 - setup.sh + ./setup.sh } teardown() { cd "${WORKING_DIR}" || exit 1 - setup.sh + ./setup.sh } @test "Check WatchTower is enabled when specified" {