From 900302b1cea8189461f871567da3ee1e0fa88526 Mon Sep 17 00:00:00 2001 From: John Mulligan Date: Mon, 23 Mar 2020 14:08:16 -0400 Subject: [PATCH] entrypoint: set default env var for requiring cephfs mount point When running cephfs tests locally there is no strong urge to require an environment exactly like that of the test container. However, we do want tests run under the container image (especially our default ci) to use the cephfs mountpoint as they were previously. Set a default value in the entrypoint script to require the mountpoint so we don't accidentally miss the tests if something unexpected goes wrong. Signed-off-by: John Mulligan --- entrypoint.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/entrypoint.sh b/entrypoint.sh index d4727f7..b7febd2 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -12,6 +12,10 @@ BUILD_TAGS="" RESULTS_DIR=/results CEPH_CONF=/tmp/ceph/ceph.conf +# env vars consumed by go code directly. +# set defaults if they are currently unset in the environment +: "${GO_CEPH_TEST_REQUIRE_MOUNT:=yes}" + CLI="$(getopt -o h --long test-run:,test-pkg:,pause,cpuprofile,memprofile,no-cover,micro-osd:,results:,ceph-conf:,help -n "${0}" -- "$@")" eval set -- "${CLI}" while true ; do @@ -155,7 +159,7 @@ post_all_tests() { test_go_ceph() { mkdir -p /tmp/ceph show "${MICRO_OSD_PATH}" /tmp/ceph - export CEPH_CONF + export CEPH_CONF GO_CEPH_TEST_REQUIRE_MOUNT if [[ ${TEST_RUN} == NONE ]]; then echo "skipping test execution"