Skip to content

Commit

Permalink
Use GOSS_FILE environment variable for dgoss (goss-org#454)
Browse files Browse the repository at this point in the history
* Use GOSS_FILE environment variable for dgoss

* Fix a typo in environment variable

* Update and documentation on README.md

* Resolve conflicts
  • Loading branch information
jfcastroluis authored and BenjaminHerbert committed May 28, 2020
1 parent e0d0b06 commit 806db79
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions extras/dgoss/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`)

Expand Down
2 changes: 1 addition & 1 deletion extras/dgoss/dgoss
Original file line number Diff line number Diff line change
Expand Up @@ -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}"

Expand Down

0 comments on commit 806db79

Please sign in to comment.