diff --git a/extras/dgoss/README.md b/extras/dgoss/README.md index d1dc93b02..c2c184728 100644 --- a/extras/dgoss/README.md +++ b/extras/dgoss/README.md @@ -72,6 +72,9 @@ The following environment variables can be set to change the behavior of dgoss. ##### GOSS_PATH Location of the goss binary to use. (Default: `$(which goss)`) +#### GOSS_FILE +Name of the goss file to use. (Default: `goss.yaml`) + ##### GOSS_OPTS Options to use for the goss test run. (Default: `--color --format documentation`) diff --git a/extras/dgoss/dgoss b/extras/dgoss/dgoss index c27d6a779..d4546a839 100755 --- a/extras/dgoss/dgoss +++ b/extras/dgoss/dgoss @@ -27,7 +27,7 @@ run(){ # Copy in goss cp "${GOSS_PATH}" "$tmp_dir/goss" chmod 755 "$tmp_dir/goss" - [[ -e "${GOSS_FILES_PATH}/goss.yaml" ]] && cp "${GOSS_FILES_PATH}/goss.yaml" "$tmp_dir" && chmod 644 "$tmp_dir/goss.yaml" + [[ -e "${GOSS_FILES_PATH}/${GOSS_FILE:-goss.yaml}" ]] && cp "${GOSS_FILES_PATH}/{$GOSS_FILE:-goss.yaml}" "$tmp_dir/goss.yaml" && chmod 644 "$tmp_dir/goss.yaml" [[ -e "${GOSS_FILES_PATH}/goss_wait.yaml" ]] && cp "${GOSS_FILES_PATH}/goss_wait.yaml" "$tmp_dir" && chmod 644 "$tmp_dir/goss_wait.yaml" [[ ! -z "${GOSS_VARS}" ]] && [[ -e "${GOSS_FILES_PATH}/${GOSS_VARS}" ]] && cp "${GOSS_FILES_PATH}/${GOSS_VARS}" "$tmp_dir" && chmod 644 "$tmp_dir/${GOSS_VARS}"