Skip to content

Commit 036f94a

Browse files
committed
Simplify test script for manual tests
1 parent 9d51762 commit 036f94a

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

test.sh

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,29 @@
11
#!/bin/bash
2+
# Runs the original Netbox unit tests and tests whether all initializers work.
3+
# Usage:
4+
# ./test.sh latest
5+
# ./test.sh v2.9.7
6+
# ./test.sh develop-2.10
7+
# IMAGE='netboxcommunity/netbox:latest' ./test.sh
8+
# IMAGE='netboxcommunity/netbox:v2.9.7' ./test.sh
9+
# IMAGE='netboxcommunity/netbox:develop-2.10' ./test.sh
10+
# export IMAGE='netboxcommunity/netbox:latest'; ./test.sh
11+
# export IMAGE='netboxcommunity/netbox:v2.9.7'; ./test.sh
12+
# export IMAGE='netboxcommunity/netbox:develop-2.10'; ./test.sh
213

314
# exit when a command exits with an exit code != 0
415
set -e
516

6-
# version is used by `docker-compose.yml` do determine the tag
17+
# IMAGE is used by `docker-compose.yml` do determine the tag
718
# of the Docker Image that is to be used
8-
export IMAGE="${IMAGE-netboxcommunity/netbox:latest}"
19+
if [ "${1}x" != "x" ]; then
20+
# Use the command line argument
21+
export IMAGE="netboxcommunity/netbox:${1}"
22+
else
23+
export IMAGE="${IMAGE-netboxcommunity/netbox:latest}"
24+
fi
925

26+
# Ensure that an IMAGE is defined
1027
if [ -z "${IMAGE}" ]; then
1128
echo "⚠️ No image defined"
1229

@@ -63,7 +80,7 @@ echo "🐳🐳🐳 Start testing '${IMAGE}'"
6380
trap test_cleanup EXIT ERR
6481
test_setup
6582

66-
test_netbox_unit_tests
83+
#test_netbox_unit_tests
6784
test_initializers
6885

6986
echo "🐳🐳🐳 Done testing '${IMAGE}'"

0 commit comments

Comments
 (0)