Merge pull request #4046 from rvanlaar/lint-fixes

Make `make test` pass on linting
This commit is contained in:
Jose Diaz-Gonzalez
2020-07-03 18:45:51 -04:00
committed by GitHub
8 changed files with 11 additions and 12 deletions

View File

@@ -847,7 +847,7 @@ internal_get_app_urls() {
declare desc="print an app's available urls"
source "$PLUGIN_AVAILABLE_PATH/certs/functions"
source "$PLUGIN_AVAILABLE_PATH/config/functions"
local APP="$2"
local RAW_TCP_PORTS="$(get_app_raw_tcp_ports "$APP")"
local URLS_FILE="$DOKKU_ROOT/$APP/URLS"

View File

@@ -13,7 +13,7 @@ trigger-git-post-app-rename-setup() {
fi
fn-plugin-property-clone "git" "$OLD_APP" "$NEW_APP"
fn-plugin-property-destroy "git" "$OLD_APP"
fn-plugin-property-destroy "git" "$OLD_APP"
}
trigger-git-post-app-rename-setup "$@"

View File

@@ -95,7 +95,6 @@ cmd-nginx-show-config() {
cat "$DOKKU_ROOT/$APP/nginx.conf"
}
cmd-nginx-validate-config() {
declare desc="validates and optionally cleans up invalid nginx configurations"
declare cmd="nginx:validate-config"

View File

@@ -453,7 +453,7 @@ nginx_build_config() {
LISTENERS="$(plugn trigger network-get-listeners "$APP" "$PROC_TYPE" | xargs)"
UPP_PROC_TYPE="${PROC_TYPE^^}"
UPP_PROC_TYPE="${UPP_PROC_TYPE//-/_}"
SIGIL_PARAMS+=( "DOKKU_APP_${UPP_PROC_TYPE}_LISTENERS=$LISTENERS" )
SIGIL_PARAMS+=("DOKKU_APP_${UPP_PROC_TYPE}_LISTENERS=$LISTENERS")
done <"$DOKKU_SCALE_FILE"
if grep DOKKU_APP_LISTENERS "$NGINX_TEMPLATE"; then

View File

@@ -11,7 +11,7 @@ trigger-nginx-vhosts-post-app-rename-setup() {
declare OLD_APP="$1" NEW_APP="$2"
fn-plugin-property-clone "nginx" "$OLD_APP" "$NEW_APP"
fn-plugin-property-destroy "nginx" "$OLD_APP"
fn-plugin-property-destroy "nginx" "$OLD_APP"
plugn trigger proxy-clear-config "$NEW_APP"
}

View File

@@ -196,12 +196,12 @@ ps_scale() {
# shellcheck disable=SC2015
[[ ! -e $DOKKU_PROCFILE ]] && extract_procfile "$APP" "$IMAGE_TAG" >/dev/null 2>&1 || true
if [[ ! -e $DOKKU_SCALE_FILE ]] ; then
if [[ ! -e $DOKKU_SCALE_FILE ]]; then
generate_scale_file "$APP" "$IMAGE_TAG" >/dev/null 2>&1
elif [[ -e $DOKKU_PROCFILE ]] ; then
elif [[ -e $DOKKU_PROCFILE ]]; then
for PROC_NAME in $(procfile-util list --procfile "$DOKKU_PROCFILE"); do
if ! grep -qE "^${PROC_NAME}=" "$DOKKU_SCALE_FILE"; then
echo "$PROC_NAME=0" >> "$DOKKU_SCALE_FILE"
echo "$PROC_NAME=0" >>"$DOKKU_SCALE_FILE"
fi
done
fi

View File

@@ -10,7 +10,7 @@ trigger-scheduler-docker-local-post-app-rename-setup() {
local APP_DIR="$DOKKU_ROOT/$NEW_APP"
fn-plugin-property-clone "scheduler-docker-local" "$OLD_APP" "$NEW_APP"
fn-plugin-property-destroy "scheduler-docker-local" "$OLD_APP"
fn-plugin-property-destroy "scheduler-docker-local" "$OLD_APP"
}
trigger-scheduler-docker-local-post-app-rename-setup "$@"

View File

@@ -217,7 +217,7 @@ assert_nonssl_domain() {
assert_app_domain() {
local domain=$1
run /bin/bash -c "dokku domains:report $TEST_APP --domains-app-vhosts | tr \" \" \"\n\" | grep -xF ${domain}"
echo "app domains: $(dokku domains:report $TEST_APP --domains-app-vhosts | tr \" \" \"\n\" )"
echo "app domains: $(dokku domains:report $TEST_APP --domains-app-vhosts | tr \" \" \"\n\")"
echo "output: $output"
echo "status: $status"
assert_output "${domain}"
@@ -262,8 +262,8 @@ assert_urls() {
run /bin/bash -c "dokku urls $TEST_APP"
echo "output: $output"
echo "status: $status"
echo "urls:" "$(tr ' ' '\n' <<< "${urls}" | sort)"
assert_output < <(tr ' ' '\n' <<< "${urls}" | sort)
echo "urls:" "$(tr ' ' '\n' <<<"${urls}" | sort)"
assert_output < <(tr ' ' '\n' <<<"${urls}" | sort)
}
deploy_app() {