fix: path error

This commit is contained in:
Rohit T P
2024-05-02 12:45:40 +00:00
parent f18655e9c1
commit 0e9c96ab02
7 changed files with 20 additions and 16 deletions

12
docker-compose/setup-script/tests/configure/setup.sh Normal file → Executable file
View File

@@ -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
cd "$NOCO_HOME" || exit
docker compose down
fi

4
docker-compose/setup-script/tests/configure/start.bats Normal file → Executable file
View File

@@ -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" {

4
docker-compose/setup-script/tests/install/default.bats Normal file → Executable file
View File

@@ -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" {

4
docker-compose/setup-script/tests/install/ip.bats Normal file → Executable file
View File

@@ -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" {

4
docker-compose/setup-script/tests/install/redis.bats Normal file → Executable file
View File

@@ -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" {

4
docker-compose/setup-script/tests/install/scale.bats Normal file → Executable file
View File

@@ -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" {

View File

@@ -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" {