File tree Expand file tree Collapse file tree 1 file changed +20
-3
lines changed Expand file tree Collapse file tree 1 file changed +20
-3
lines changed Original file line number Diff line number Diff line change 1
1
#! /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
2
13
3
14
# exit when a command exits with an exit code != 0
4
15
set -e
5
16
6
- # version is used by `docker-compose.yml` do determine the tag
17
+ # IMAGE is used by `docker-compose.yml` do determine the tag
7
18
# 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
9
25
26
+ # Ensure that an IMAGE is defined
10
27
if [ -z " ${IMAGE} " ]; then
11
28
echo " ⚠️ No image defined"
12
29
@@ -63,7 +80,7 @@ echo "🐳🐳🐳 Start testing '${IMAGE}'"
63
80
trap test_cleanup EXIT ERR
64
81
test_setup
65
82
66
- test_netbox_unit_tests
83
+ # test_netbox_unit_tests
67
84
test_initializers
68
85
69
86
echo " 🐳🐳🐳 Done testing '${IMAGE} '"
You can’t perform that action at this time.
0 commit comments