Browse Source

test: add mocks

pull/8373/head
Rohit T P 6 months ago
parent
commit
dc8d6da4b9
  1. 6
      docker-compose/setup-script/tests/configure/stop.bats
  2. 2
      docker-compose/setup-script/tests/expects/configure/monitor.sh
  3. 2
      docker-compose/setup-script/tests/expects/configure/restart.sh
  4. 2
      docker-compose/setup-script/tests/expects/configure/scale.sh
  5. 2
      docker-compose/setup-script/tests/expects/configure/start.sh
  6. 2
      docker-compose/setup-script/tests/expects/configure/stop.sh
  7. 2
      docker-compose/setup-script/tests/expects/configure/upgrade.sh
  8. 2
      docker-compose/setup-script/tests/expects/install/default.sh
  9. 2
      docker-compose/setup-script/tests/expects/install/ip.sh
  10. 2
      docker-compose/setup-script/tests/expects/install/redis.sh
  11. 2
      docker-compose/setup-script/tests/expects/install/scale.sh
  12. 2
      docker-compose/setup-script/tests/expects/install/ssl.sh
  13. 2
      docker-compose/setup-script/tests/expects/install/watchtower.sh
  14. 3
      docker-compose/setup-script/tests/mocks/clear
  15. 3
      docker-compose/setup-script/tests/mocks/nproc

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

@ -21,7 +21,7 @@ teardown() {
cd "${NOCO_HOME}" || exit 1
# Verify container is not running
docker compose ps | grep -q 'redis' && fail "Redis is running"
docker compose ps | grep -q 'watchtower' && fail "WatchTower is running"
docker compose ps | grep -q 'nocodb' && fail "NocoDB is running"
docker compose ps | grep -q 'redis' && exit 1
docker compose ps | grep -q 'watchtower' && exit 1
docker compose ps | grep -q 'nocodb' && exit 1
}

2
docker-compose/setup-script/tests/expects/configure/monitor.sh

@ -4,6 +4,8 @@
set timeout 10
# Start your main script
set env(PATH) "$env(WORKING_DIR)/mocks:$env(PATH)"
spawn bash ../../noco.sh
expect "Do you want to reinstall NocoDB*"

2
docker-compose/setup-script/tests/expects/configure/restart.sh

@ -4,6 +4,8 @@
set timeout 10
# Start your main script
set env(PATH) "$env(WORKING_DIR)/mocks:$env(PATH)"
spawn bash ../../noco.sh
expect "Do you want to reinstall NocoDB*"

2
docker-compose/setup-script/tests/expects/configure/scale.sh

@ -4,6 +4,8 @@
set timeout 10
# Start your main script
set env(PATH) "$env(WORKING_DIR)/mocks:$env(PATH)"
spawn bash ../../noco.sh
expect "Do you want to reinstall NocoDB*"

2
docker-compose/setup-script/tests/expects/configure/start.sh

@ -4,6 +4,8 @@
set timeout 10
# Start your main script
set env(PATH) "$env(WORKING_DIR)/mocks:$env(PATH)"
spawn bash ../../noco.sh
expect "Do you want to reinstall NocoDB*"

2
docker-compose/setup-script/tests/expects/configure/stop.sh

@ -4,6 +4,8 @@
set timeout 10
# Start your main script
set env(PATH) "$env(WORKING_DIR)/mocks:$env(PATH)"
spawn bash ../../noco.sh
expect "Do you want to reinstall NocoDB*"

2
docker-compose/setup-script/tests/expects/configure/upgrade.sh

@ -4,6 +4,8 @@
set timeout 10
# Start your main script
set env(PATH) "$env(WORKING_DIR)/mocks:$env(PATH)"
spawn bash ../../noco.sh
expect "Do you want to reinstall NocoDB*"

2
docker-compose/setup-script/tests/expects/install/default.sh

@ -4,6 +4,8 @@
set timeout 10
# Start your main script
set env(PATH) "$env(WORKING_DIR)/mocks:$env(PATH)"
spawn bash ../../noco.sh
# Respond to script prompts

2
docker-compose/setup-script/tests/expects/install/ip.sh

@ -5,6 +5,8 @@
set timeout 10
# Start your main script
set env(PATH) "$env(WORKING_DIR)/mocks:$env(PATH)"
spawn bash ../../noco.sh
# Respond to script prompts

2
docker-compose/setup-script/tests/expects/install/redis.sh

@ -4,6 +4,8 @@
set timeout 10
# Start your main script
set env(PATH) "$env(WORKING_DIR)/mocks:$env(PATH)"
spawn bash ../../noco.sh
# Respond to script prompts

2
docker-compose/setup-script/tests/expects/install/scale.sh

@ -4,6 +4,8 @@
set timeout 10
# Start your main script
set env(PATH) "$env(WORKING_DIR)/mocks:$env(PATH)"
spawn bash ../../noco.sh
# Respond to script prompts

2
docker-compose/setup-script/tests/expects/install/ssl.sh

@ -6,6 +6,8 @@ set timeout 10
set random_number [lindex $argv 0]
# Start your main script
set env(PATH) "$env(WORKING_DIR)/mocks:$env(PATH)"
spawn bash ../../noco.sh
# Respond to script prompts

2
docker-compose/setup-script/tests/expects/install/watchtower.sh

@ -4,6 +4,8 @@
set timeout 10
# Start your main script
set env(PATH) "$env(WORKING_DIR)/mocks:$env(PATH)"
spawn bash ../../noco.sh
# Respond to script prompts

3
docker-compose/setup-script/tests/mocks/clear

@ -0,0 +1,3 @@
#!/bin/bash
echo "--- Clear Mock ---"

3
docker-compose/setup-script/tests/mocks/nproc

@ -0,0 +1,3 @@
#!/bin/bash
echo 4
Loading…
Cancel
Save