Skip to content

Commit

Permalink
clear composer output
Browse files Browse the repository at this point in the history
  • Loading branch information
vitaly4n committed Sep 16, 2024
1 parent ce8bb18 commit 9cfc146
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 15 deletions.
5 changes: 1 addition & 4 deletions _impl/_compose_test_create_args.sh
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,4 @@ if [[ -n ${_artifacts_bucket} ]]; then
_ARGS+=(--artifacts-output-bucket "${_artifacts_bucket}")
fi

(
IFS=$'\t'
echo "${ARGS[*]}"
)
printf '%s\0' "${ARGS[@]}"
10 changes: 5 additions & 5 deletions _impl/_functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,13 @@ function _log_outs() {
local _level=0
fi

if [[ -n "$YC_SECRET_OUTPUT" ]]; then
_stdout='***SECRET***'
fi

_logv "$_level" "Command $1 finished with status $_rc:"
_logv "$_level" " stderr: $_stderr"
_logv "$_level" " stdout: $_stdout"
if [[ -n "$YC_SECRET_OUTPUT" ]]; then
_logv "$_level" " stdout: ***SECRET***"
else
_logv "$_level" " stdout: $_stdout"
fi

printf '%s' "$_stdout" 2>/dev/null
return ${_rc}
Expand Down
16 changes: 10 additions & 6 deletions _impl/test_run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -194,14 +194,18 @@ if [[ -n $VAR_ARTIFACTS_BUCKET ]]; then
_composer_args+=(--artifacts-bucket "${VAR_ARTIFACTS_BUCKET}")
fi

if ! _composer_output=$(run_script "$_SCRIPT_DIR/_compose_test_create_args.sh" "${_composer_args[@]}"); then
_log "Failed: output=$_composer_output"
fi
function _call_composer() {
if ! run_script "$_SCRIPT_DIR/_compose_test_create_args.sh" "${_composer_args[@]}"; then
_log "Failed to compose arguments"
fi
}

_logv 1 "Composer arguments:"
_test_create_args=()
IFS=$'\t' read -d '' -ra _test_create_args <<<"$_composer_output" || true

_logv 1 "Composed: ${_test_create_args[*]}"
while IFS= read -d '' -r _arg; do
_logv 1 " arg: $_arg"
_test_create_args+=("$_arg")
done < <(_call_composer)

# ---------------------------------------------------------------------------- #
# Run the test #
Expand Down

0 comments on commit 9cfc146

Please sign in to comment.