Browse Source

refactor: renamed tests

pull/8373/head
Rohit T P 6 months ago
parent
commit
1bacb13caa
  1. 2
      docker-compose/setup-script/tests/configure/restart.bats
  2. 2
      docker-compose/setup-script/tests/configure/scale.bats
  3. 4
      docker-compose/setup-script/tests/configure/setup.sh
  4. 2
      docker-compose/setup-script/tests/configure/start.bats
  5. 2
      docker-compose/setup-script/tests/configure/stop.bats
  6. 2
      docker-compose/setup-script/tests/configure/upgrade.bats
  7. 2
      docker-compose/setup-script/tests/install/default.bats
  8. 2
      docker-compose/setup-script/tests/install/ip.bats
  9. 5
      docker-compose/setup-script/tests/install/scale.bats
  10. 5
      docker-compose/setup-script/tests/install/setup.sh

2
docker-compose/setup-script/tests/configure/restart.bats

@ -15,7 +15,7 @@ teardown() {
./setup.sh ./setup.sh
} }
@test "Check Redis, WatchTower and NocoDB are restarted" { @test "Check all containers are restarted" {
../expects/configure/restart.sh ../expects/configure/restart.sh
cd "${NOCO_HOME}" || exit 1 cd "${NOCO_HOME}" || exit 1

2
docker-compose/setup-script/tests/configure/scale.bats

@ -24,6 +24,6 @@ teardown() {
cd "${NOCO_HOME}" || exit 1 cd "${NOCO_HOME}" || exit 1
result=$(docker-compose ps | grep -c "nocodb/nocodb") result=$(docker compose ps | grep -c "nocodb/nocodb")
[ "${result}" -eq 3 ] [ "${result}" -eq 3 ]
} }

4
docker-compose/setup-script/tests/configure/setup.sh

@ -1,7 +1,5 @@
#!/bin/bash #!/bin/bash
WORKING_DIR=$(dirname "$0")
if [ -z "$NOCO_HOME" ]; then if [ -z "$NOCO_HOME" ]; then
NOCO_HOME="${HOME}/.nocodb" NOCO_HOME="${HOME}/.nocodb"
fi fi
@ -15,7 +13,7 @@ cd "$WORKING_DIR" || exit
rm -rf "$NOCO_HOME" rm -rf "$NOCO_HOME"
if [ "$1" = "setup" ]; then if [ "$1" = "setup" ]; then
../../noco.sh <<< $'\n\nN\n' ../noco.sh <<< $'\n\nN\n'
cd "$NOCO_HOME" || exit cd "$NOCO_HOME" || exit
docker compose down docker compose down

2
docker-compose/setup-script/tests/configure/start.bats

@ -15,7 +15,7 @@ teardown() {
./setup.sh ./setup.sh
} }
@test "Check Redis, WatchTower and NocoDB are up" { @test "Check all containers are up" {
../expects/configure/start.sh ../expects/configure/start.sh
cd "${NOCO_HOME}" || exit 1 cd "${NOCO_HOME}" || exit 1

2
docker-compose/setup-script/tests/configure/stop.bats

@ -15,7 +15,7 @@ teardown() {
./setup.sh ./setup.sh
} }
@test "Check Redis, WatchTower and NocoDB are down" { @test "Check all containers are down" {
../expects/configure/stop.sh ../expects/configure/stop.sh
cd "${NOCO_HOME}" || exit 1 cd "${NOCO_HOME}" || exit 1

2
docker-compose/setup-script/tests/configure/upgrade.bats

@ -15,7 +15,7 @@ teardown() {
./setup.sh ./setup.sh
} }
@test "Check Redis, WatchTower and NocoDB are upgraded" { @test "Check all containers are upgraded" {
../expects/configure/upgrade.sh ../expects/configure/upgrade.sh
cd "${NOCO_HOME}" || exit 1 cd "${NOCO_HOME}" || exit 1

2
docker-compose/setup-script/tests/install/default.bats

@ -15,7 +15,7 @@ teardown() {
./setup.sh ./setup.sh
} }
@test "Check Redis, WatchTower and NocoDB are up" { @test "Check installation with all default options" {
../expects/install/default.sh ../expects/install/default.sh
cd "${NOCO_HOME}" cd "${NOCO_HOME}"

2
docker-compose/setup-script/tests/install/ip.bats

@ -15,7 +15,7 @@ teardown() {
./setup.sh ./setup.sh
} }
@test "Check Redis, WatchTower and NocoDB are up with custom ip" { @test "Check installation with custom ip" {
../expects/install/ip.sh ../expects/install/ip.sh
cd "${NOCO_HOME}" cd "${NOCO_HOME}"

5
docker-compose/setup-script/tests/install/scale.bats

@ -16,11 +16,6 @@ teardown() {
} }
@test "Check if two instances of NoCoDB can be run" { @test "Check if two instances of NoCoDB can be run" {
# Mock nproc to return 4
nproc() {
echo 4
}
../expects/install/scale.sh ../expects/install/scale.sh
cd "${NOCO_HOME}" cd "${NOCO_HOME}"

5
docker-compose/setup-script/tests/install/setup.sh

@ -10,8 +10,3 @@ if [ -d "$NOCO_HOME" ]; then
fi fi
rm -rf "$NOCO_HOME" rm -rf "$NOCO_HOME"
clear()
{
echo "clear mocked"
}

Loading…
Cancel
Save