forked from hyperledger/besu
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtest.sh
executable file
·29 lines (24 loc) · 899 Bytes
/
test.sh
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
#!/bin/bash
export GOSS_PATH=tests/goss-linux-amd64
export GOSS_OPTS="$GOSS_OPTS --format junit"
export GOSS_FILES_STRATEGY=cp
DOCKER_IMAGE=$1
DOCKER_FILE="${2:-$PWD/Dockerfile}"
i=0
## Checks on the Dockerfile
GOSS_FILES_PATH=tests/00 \
bash tests/dgoss dockerfile $DOCKER_IMAGE $DOCKER_FILE \
> ./reports/00.xml || i=`expr $i + 1`
# fail fast if we dont pass static checks
if [[ $i != 0 ]]; then exit $i; fi
# Test for normal startup with ports opened
# we test that things listen on the right interface/port, not what interface the advertise
# hence we dont set p2p-host=0.0.0.0 because this sets what its advertising to devp2p; the important piece is that it defaults to listening on all interfaces
GOSS_FILES_PATH=tests/01 \
bash tests/dgoss run $DOCKER_IMAGE \
--network=dev \
--rpc-http-enabled \
--rpc-ws-enabled \
--graphql-http-enabled \
> ./reports/01.xml || i=`expr $i + 1`
exit $i