forked from rancher/rancher
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest
More file actions
executable file
·38 lines (32 loc) · 831 Bytes
/
test
File metadata and controls
executable file
·38 lines (32 loc) · 831 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash
set -e
CWD=$(pwd -P)
cleanup()
{
EXIT=$?
set +e
echo Stopping rancher server
kill $PID
wait $PID
echo Cleanup DIND
TESTS="$CWD/$(dirname $0)/../tests"
for dindYML in $(find $TESTS -iname 'dind-*.yml'); do
rke remove --dind --force --config $dindYML
rm -f $dindYML
done
return $EXIT
}
#PACKAGES=". $(find -name '*.go' | xargs -I{} dirname {} | cut -f2 -d/ | sort -u | grep -Ev '(^\.$|.git|.trash-cache|vendor|bin)' | sed -e 's!^!./!' -e 's!$!/...!')"
#
#[ "${ARCH}" == "amd64" ] && RACE=-race
#go test ${RACE} -cover -tags=test ${PACKAGES}
$(dirname $0)/run &
PID=$!
trap cleanup exit
while ! curl -sf http://localhost:8080/ping; do
sleep 2
done
echo Running tests
cd $(dirname $0)/../tests
tox -- -m "not nonparallel" -n $(nproc)
tox -- -m nonparallel