mirror of
https://github.com/nocodb/nocodb.git
synced 2026-04-26 16:45:47 +00:00
test: test for configure/start
This commit is contained in:
18
docker-compose/setup-script/tests/configure/setup.sh
Normal file
18
docker-compose/setup-script/tests/configure/setup.sh
Normal file
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ -z "$NOCO_HOME" ]; then
|
||||
NOCO_HOME="${HOME}/.nocodb"
|
||||
fi
|
||||
|
||||
if [ -d "$NOCO_HOME" ]; then
|
||||
cd "$NOCO_HOME" || exit
|
||||
docker compose down
|
||||
fi
|
||||
|
||||
cd /tmp || exit
|
||||
rm -rf "$NOCO_HOME"
|
||||
|
||||
../noco.sh <<< $'\n\nN\n'
|
||||
|
||||
cd "$NOCO_HOME" || exit
|
||||
docker compose down
|
||||
27
docker-compose/setup-script/tests/configure/start.bats
Normal file
27
docker-compose/setup-script/tests/configure/start.bats
Normal file
@@ -0,0 +1,27 @@
|
||||
#!/usr/bin/env bats
|
||||
|
||||
NOCO_HOME="${HOME}/.nocodb"
|
||||
export NOCO_HOME
|
||||
|
||||
WORKING_DIR="$(pwd)"
|
||||
|
||||
setup() {
|
||||
cd "${WORKING_DIR}" || exit 1
|
||||
setup.sh
|
||||
}
|
||||
|
||||
teardown() {
|
||||
cd "${WORKING_DIR}" || exit 1
|
||||
setup.sh
|
||||
}
|
||||
|
||||
@test "Check Redis, WatchTower and NocoDB are up" {
|
||||
../expects/configure/start.sh
|
||||
|
||||
cd "${NOCO_HOME}" || exit 1
|
||||
|
||||
# Verify container is running
|
||||
docker compose ps | grep -q 'redis'
|
||||
docker compose ps | grep -q 'watchtower'
|
||||
docker compose ps | grep -q 'nocodb'
|
||||
}
|
||||
Reference in New Issue
Block a user