entrypoint: wrap main code in a function

As preparation for upcoming changes, move the main code of entrypoint.sh
into functions. Best viewed by ignore whitespace.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
This commit is contained in:
John Mulligan 2020-02-03 13:47:12 -05:00 committed by Niels de Vos
parent 176e6cc198
commit 25bd9f0bed
1 changed files with 47 additions and 40 deletions

View File

@ -51,6 +51,7 @@ while true ; do
esac
done
test_go_ceph() {
mkdir -p /tmp/ceph
"${MICRO_OSD_PATH}" /tmp/ceph
export CEPH_CONF=/tmp/ceph/ceph.conf
@ -90,7 +91,13 @@ else
mkdir -p /results/coverage
go tool cover -html=cover.out -o /results/coverage/go-ceph.html
fi
}
pause_if_needed() {
if [[ ${PAUSE} = yes ]]; then
sleep infinity
fi
}
test_go_ceph
pause_if_needed