tests: correct test issues
This commit is contained in:
@@ -8,7 +8,7 @@ cmd-urls() {
|
||||
declare cmd="url"
|
||||
declare APP="$2"
|
||||
|
||||
[[ -z $2 ]] && dokku_log_fail "Please specify an app to run the command on"
|
||||
[[ -z "$APP" ]] && dokku_log_fail "Please specify an app to run the command on"
|
||||
|
||||
get_app_urls "$@"
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ cmd-docker-options-add() {
|
||||
[[ "$1" == "$cmd" ]] && shift 1
|
||||
declare APP="$1"
|
||||
|
||||
verify_app_name "$2"
|
||||
verify_app_name "$APP"
|
||||
read -ra passed_phases <<<"$(get_phases "$2")"
|
||||
shift 2 # everything else passed is the docker option
|
||||
local passed_docker_option="$*"
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
cmd-ssh-keys-list() {
|
||||
declare desc="List ssh key hashes"
|
||||
declare cmd="ssh-keys:list"
|
||||
[[ "$1" == "$cmd" ]] && shift 1
|
||||
|
||||
verify_ssh_key_file
|
||||
sshcommand list dokku
|
||||
}
|
||||
@@ -2,6 +2,15 @@
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/ssh-keys/internal-functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/ssh-keys/functions"
|
||||
|
||||
cmd-ssh-keys-list() {
|
||||
declare desc="List ssh key hashes"
|
||||
declare cmd="ssh-keys:list"
|
||||
[[ "$1" == "$cmd" ]] && shift 1
|
||||
|
||||
verify_ssh_key_file
|
||||
sshcommand list dokku
|
||||
}
|
||||
|
||||
cmd-ssh-keys-list "$@"
|
||||
|
||||
@@ -12,7 +12,9 @@ cmd-storage-mount() {
|
||||
declare APP="$1" MOUNT_PATH="$2"
|
||||
local passed_phases=(deploy run)
|
||||
|
||||
[[ -z "$APP" || "$MOUNT_PATH" ]] && dokku_log_fail "storage:mount requires an app and a two paths divided by colon."
|
||||
[[ -z "$APP" ]] && dokku_log_fail "Please specify an app to run the command on"
|
||||
[[ -z "$MOUNT_PATH" ]] && dokku_log_fail "Please specify two paths delimited by colon."
|
||||
|
||||
verify_app_name "$APP"
|
||||
verify_paths "$MOUNT_PATH"
|
||||
check_if_path_exists "$MOUNT_PATH" "$(get_phase_file_path "${passed_phases[@]}")" && dokku_log_fail "Mount path already exists."
|
||||
|
||||
@@ -12,7 +12,8 @@ cmd-storage-unmount() {
|
||||
declare APP="$1" MOUNT_PATH="$2"
|
||||
local passed_phases=(deploy run)
|
||||
|
||||
[[ -z "$APP" || "$MOUNT_PATH" ]] && dokku_log_fail "storage:unmount requires an app and a two paths divided by colon."
|
||||
[[ -z "$APP" ]] && dokku_log_fail "Please specify an app to run the command on"
|
||||
[[ -z "$MOUNT_PATH" ]] && dokku_log_fail "Please specify two paths delimited by colon."
|
||||
verify_app_name "$APP"
|
||||
verify_paths "$MOUNT_PATH"
|
||||
check_if_path_exists "$MOUNT_PATH" "$(get_phase_file_path "${passed_phases[@]}")" || dokku_log_fail "Mount path does not exist."
|
||||
|
||||
Reference in New Issue
Block a user