Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Improved Script Efficiency and Readability #8065

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions docker/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
##

export TEST_PATH=./tests
export architecture=$(uname -m)
export GOSS_PATH=$TEST_PATH/goss-linux-${architecture}
export GOSS_OPTS="$GOSS_OPTS --format junit"
export GOSS_FILES_STRATEGY=cp
Expand All @@ -26,9 +27,10 @@ i=0
## Checks on the Dockerfile
GOSS_FILES_PATH=$TEST_PATH/00 \
bash $TEST_PATH/dgoss dockerfile $DOCKER_IMAGE $DOCKER_FILE \
> ./reports/00.xml || i=`expr $i + 1`
> ./reports/00.xml || ((i++))

# fail fast if we dont pass static checks
if [[ $i != 0 ]]; then exit $i; fi
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
Expand All @@ -39,14 +41,14 @@ bash $TEST_PATH/dgoss run --sysctl net.ipv6.conf.all.disable_ipv6=1 $DOCKER_IMAG
--rpc-http-enabled \
--rpc-ws-enabled \
--graphql-http-enabled \
> ./reports/01.xml || i=`expr $i + 1`
> ./reports/01.xml || ((i++))

if [[ $i != 0 ]]; then exit $i; fi
if ((i != 0)); then exit $i; fi

# Test for directory permissions
GOSS_FILES_PATH=$TEST_PATH/02 \
bash $TEST_PATH/dgoss run --sysctl net.ipv6.conf.all.disable_ipv6=1 -v besu-data:/var/lib/besu $DOCKER_IMAGE --data-path=/var/lib/besu \
--network=dev \
> ./reports/02.xml || i=`expr $i + 1`
> ./reports/02.xml || ((i++))

exit $i