diff --git a/common-functions b/common-functions index d215074..adfec90 100755 --- a/common-functions +++ b/common-functions @@ -735,7 +735,7 @@ verify_service_name() { is_valid_service_name() { declare desc="Validates a service name" declare SERVICE="$1" - [[ -z "$SERVICE" ]] && dokku_log_fail "SERVICE must not be null" + [[ -z "$SERVICE" ]] && return 1 if [[ "$SERVICE" =~ ^[A-Za-z0-9_]+$ ]]; then return 0 diff --git a/functions b/functions index 4e1ccc0..eb61593 100755 --- a/functions +++ b/functions @@ -22,7 +22,7 @@ service_connect() { service_create() { local SERVICE="$1" is_valid_service_name "$SERVICE" || dokku_log_fail "Please specify a valid name for the service. Valid characters are: [A-Za-z0-9_]+" - [[ -z "$SERVICE" ]] && dokku_log_fail "Please specify a name for the service" + [[ -z "$SERVICE" ]] && dokku_log_fail "Please specify a valid name for the service" [[ ! -d "$PLUGIN_DATA_ROOT/$SERVICE" ]] || dokku_log_fail "$PLUGIN_SERVICE service $SERVICE already exists" SERVICE_ROOT="$PLUGIN_DATA_ROOT/$SERVICE"; LINKS_FILE="$SERVICE_ROOT/LINKS" diff --git a/subcommands/backup b/subcommands/backup index ff52626..a22b976 100755 --- a/subcommands/backup +++ b/subcommands/backup @@ -15,7 +15,7 @@ service-backup-cmd() { declare SERVICE="$1" BUCKET_NAME="$2" USE_IAM_OPTIONAL_FLAG="$3" is_implemented_command "$cmd" || dokku_log_fail "Not yet implemented" - [[ -z "$SERVICE" ]] && dokku_log_fail "Please specify a name for the service" + [[ -z "$SERVICE" ]] && dokku_log_fail "Please specify a valid name for the service" [[ -z "$BUCKET_NAME" ]] && dokku_log_fail "Please specify an aws bucket for the backup" verify_service_name "$SERVICE" service_backup "$SERVICE" "$BUCKET_NAME" "$USE_IAM_OPTIONAL_FLAG" diff --git a/subcommands/backup-auth b/subcommands/backup-auth index 3bf97a1..5c528bb 100755 --- a/subcommands/backup-auth +++ b/subcommands/backup-auth @@ -24,7 +24,7 @@ service-backup-auth-cmd() { declare SERVICE="$1" AWS_ACCESS_KEY_ID="$2" AWS_SECRET_ACCESS_KEY="$3" AWS_DEFAULT_REGION="$4" AWS_SIGNATURE_VERSION="$5" ENDPOINT_URL="$6" is_implemented_command "$cmd" || dokku_log_fail "Not yet implemented" - [[ -z "$SERVICE" ]] && dokku_log_fail "Please specify a name for the service" + [[ -z "$SERVICE" ]] && dokku_log_fail "Please specify a valid name for the service" [[ -z "$AWS_ACCESS_KEY_ID" ]] && dokku_log_fail "Please specify an aws access key id" [[ -z "$AWS_SECRET_ACCESS_KEY" ]] && dokku_log_fail "Please specify an aws secret access key" verify_service_name "$SERVICE" diff --git a/subcommands/backup-deauth b/subcommands/backup-deauth index a8f3fac..9d01e9c 100755 --- a/subcommands/backup-deauth +++ b/subcommands/backup-deauth @@ -13,7 +13,7 @@ service-backup-deauth-cmd() { declare SERVICE="$1" is_implemented_command "$cmd" || dokku_log_fail "Not yet implemented" - [[ -z "$SERVICE" ]] && dokku_log_fail "Please specify a name for the service" + [[ -z "$SERVICE" ]] && dokku_log_fail "Please specify a valid name for the service" verify_service_name "$SERVICE" service_backup_deauth "$SERVICE" } diff --git a/subcommands/backup-schedule b/subcommands/backup-schedule index a95c478..8802da7 100755 --- a/subcommands/backup-schedule +++ b/subcommands/backup-schedule @@ -19,7 +19,7 @@ service-backup-schedule-cmd() { declare SERVICE="$1" SCHEDULE="$2" BUCKET_NAME="$3" USE_IAM_OPTIONAL_FLAG="$4" is_implemented_command "$cmd" || dokku_log_fail "Not yet implemented" - [[ -z "$SERVICE" ]] && dokku_log_fail "Please specify a name for the service" + [[ -z "$SERVICE" ]] && dokku_log_fail "Please specify a valid name for the service" [[ -z "$SCHEDULE" ]] && dokku_log_fail "Please specify a schedule for the backup" [[ -z "$BUCKET_NAME" ]] && dokku_log_fail "Please specify an aws bucket for the backup" verify_service_name "$SERVICE" diff --git a/subcommands/backup-schedule-cat b/subcommands/backup-schedule-cat index 3cfd326..7607991 100755 --- a/subcommands/backup-schedule-cat +++ b/subcommands/backup-schedule-cat @@ -12,7 +12,7 @@ service-backup-schedule-cat-cmd() { local cmd="$PLUGIN_COMMAND_PREFIX:backup-schedule-cat" argv=("$@"); [[ ${argv[0]} == "$cmd" ]] && shift 1 declare SERVICE="$1" - [[ -z "$SERVICE" ]] && dokku_log_fail "Please specify a name for the service" + [[ -z "$SERVICE" ]] && dokku_log_fail "Please specify a valid name for the service" verify_service_name "$SERVICE" service_backup_schedule_cat "$SERVICE" } diff --git a/subcommands/backup-set-encryption b/subcommands/backup-set-encryption index dce3620..0e18de0 100755 --- a/subcommands/backup-set-encryption +++ b/subcommands/backup-set-encryption @@ -14,7 +14,7 @@ service-backup-set-encryption-cmd() { declare SERVICE="$1" PASSPHRASE="$2" is_implemented_command "$cmd" || dokku_log_fail "Not yet implemented" - [[ -z "$SERVICE" ]] && dokku_log_fail "Please specify a name for the service" + [[ -z "$SERVICE" ]] && dokku_log_fail "Please specify a valid name for the service" [[ -z "$PASSPHRASE" ]] && dokku_log_fail "Please specify a GPG backup passphrase" verify_service_name "$SERVICE" service_backup_set_encryption "$SERVICE" "$PASSPHRASE" diff --git a/subcommands/backup-unschedule b/subcommands/backup-unschedule index 73d902b..b305901 100755 --- a/subcommands/backup-unschedule +++ b/subcommands/backup-unschedule @@ -13,7 +13,7 @@ service-backup-unschedule-cmd() { declare SERVICE="$1" is_implemented_command "$cmd" || dokku_log_fail "Not yet implemented" - [[ -z "$SERVICE" ]] && dokku_log_fail "Please specify a name for the service" + [[ -z "$SERVICE" ]] && dokku_log_fail "Please specify a valid name for the service" verify_service_name "$SERVICE" service_backup_unschedule "$SERVICE" } diff --git a/subcommands/backup-unset-encryption b/subcommands/backup-unset-encryption index 619772c..acd4b4c 100755 --- a/subcommands/backup-unset-encryption +++ b/subcommands/backup-unset-encryption @@ -13,7 +13,7 @@ service-backup-unset-encryption-cmd() { declare SERVICE="$1" is_implemented_command "$cmd" || dokku_log_fail "Not yet implemented" - [[ -z "$SERVICE" ]] && dokku_log_fail "Please specify a name for the service" + [[ -z "$SERVICE" ]] && dokku_log_fail "Please specify a valid name for the service" verify_service_name "$SERVICE" service_backup_unset_encryption "$SERVICE" } diff --git a/subcommands/clone b/subcommands/clone index ab0e073..bc8fe48 100755 --- a/subcommands/clone +++ b/subcommands/clone @@ -19,7 +19,7 @@ service-clone-cmd() { declare SERVICE="$1" NEW_SERVICE="$2" CLONE_FLAGS_LIST="${@:3}" is_implemented_command "$cmd" || dokku_log_fail "Not yet implemented" - [[ -z "$SERVICE" ]] && dokku_log_fail "Please specify a name for the service" + [[ -z "$SERVICE" ]] && dokku_log_fail "Please specify a valid name for the service" [[ -z "$NEW_SERVICE" ]] && dokku_log_fail "Please specify a name for the new service" verify_service_name "$SERVICE" diff --git a/subcommands/connect b/subcommands/connect index 10bf500..0746db4 100755 --- a/subcommands/connect +++ b/subcommands/connect @@ -13,7 +13,7 @@ service-connect-cmd() { declare SERVICE="$1" is_implemented_command "$cmd" || dokku_log_fail "Not yet implemented" - [[ -z "$SERVICE" ]] && dokku_log_fail "Please specify a name for the service" + [[ -z "$SERVICE" ]] && dokku_log_fail "Please specify a valid name for the service" verify_service_name "$SERVICE" service_connect "$SERVICE" } diff --git a/subcommands/connect-admin b/subcommands/connect-admin index 5fe9b44..f6ec983 100755 --- a/subcommands/connect-admin +++ b/subcommands/connect-admin @@ -12,7 +12,7 @@ service-connect-admin-cmd() { local cmd="$PLUGIN_COMMAND_PREFIX:connect-admin" argv=("$@"); [[ ${argv[0]} == "$cmd" ]] && shift 1 declare SERVICE="$1" - [[ -z "$SERVICE" ]] && dokku_log_fail "Please specify a name for the service" + [[ -z "$SERVICE" ]] && dokku_log_fail "Please specify a valid name for the service" verify_service_name "$SERVICE" SERVICE_ROOT="$PLUGIN_DATA_ROOT/$SERVICE" SERVICE_NAME="$(get_service_name "$SERVICE")" diff --git a/subcommands/destroy b/subcommands/destroy index e25938b..713bf60 100755 --- a/subcommands/destroy +++ b/subcommands/destroy @@ -13,7 +13,7 @@ service-destroy-cmd() { local cmd="$PLUGIN_COMMAND_PREFIX:destroy" argv=("$@"); [[ ${argv[0]} == "$cmd" ]] && shift 1 declare SERVICE="$1" FORCE_FLAG="$2" - [[ -z "$SERVICE" ]] && dokku_log_fail "Please specify a name for the service" + [[ -z "$SERVICE" ]] && dokku_log_fail "Please specify a valid name for the service" verify_service_name "$SERVICE" SERVICE_ROOT="$PLUGIN_DATA_ROOT/$SERVICE"; LINKS_FILE="$SERVICE_ROOT/LINKS" SERVICE_HOST_ROOT="$PLUGIN_DATA_HOST_ROOT/$SERVICE" diff --git a/subcommands/exists b/subcommands/exists index 93b6a99..457aa27 100755 --- a/subcommands/exists +++ b/subcommands/exists @@ -12,7 +12,7 @@ service-exists-cmd() { local cmd="$PLUGIN_COMMAND_PREFIX:exists" argv=("$@"); [[ ${argv[0]} == "$cmd" ]] && shift 1 declare SERVICE="$1" - [[ -z "$SERVICE" ]] && dokku_log_fail "Please specify a name for the service" + [[ -z "$SERVICE" ]] && dokku_log_fail "Please specify a valid name for the service" verify_service_name "$SERVICE" dokku_log_info1 "Service $SERVICE exists" } diff --git a/subcommands/export b/subcommands/export index 84ebec3..d63e95b 100755 --- a/subcommands/export +++ b/subcommands/export @@ -15,7 +15,7 @@ service-export-cmd() { declare SERVICE="$1" is_implemented_command "$cmd" || dokku_log_fail "Not yet implemented" - [[ -z "$SERVICE" ]] && dokku_log_fail "Please specify a name for the service" + [[ -z "$SERVICE" ]] && dokku_log_fail "Please specify a valid name for the service" verify_service_name "$SERVICE" service_export "$SERVICE" } diff --git a/subcommands/expose b/subcommands/expose index 70ac6eb..bcee26c 100755 --- a/subcommands/expose +++ b/subcommands/expose @@ -13,7 +13,7 @@ service-expose-cmd() { local cmd="$PLUGIN_COMMAND_PREFIX:expose" argv=("$@"); [[ ${argv[0]} == "$cmd" ]] && shift 1 declare SERVICE="$1" PORTS_LIST="${@:2}" - [[ -z "$SERVICE" ]] && dokku_log_fail "Please specify a name for the service" + [[ -z "$SERVICE" ]] && dokku_log_fail "Please specify a valid name for the service" verify_service_name "$SERVICE" service_port_expose "$SERVICE" "${@:2}" } diff --git a/subcommands/import b/subcommands/import index 28f85d9..1239c4f 100755 --- a/subcommands/import +++ b/subcommands/import @@ -13,7 +13,7 @@ service-import-cmd() { declare SERVICE="$1" is_implemented_command "$cmd" || dokku_log_fail "Not yet implemented" - [[ -z "$SERVICE" ]] && dokku_log_fail "Please specify a name for the service" + [[ -z "$SERVICE" ]] && dokku_log_fail "Please specify a valid name for the service" verify_service_name "$SERVICE" service_import "$SERVICE" } diff --git a/subcommands/info b/subcommands/info index e76da83..d1dd6aa 100755 --- a/subcommands/info +++ b/subcommands/info @@ -33,7 +33,7 @@ service-info-cmd() { local cmd="$PLUGIN_COMMAND_PREFIX:info" argv=("$@"); [[ ${argv[0]} == "$cmd" ]] && shift 1 declare SERVICE="$1" INFO_FLAG="$2" - [[ -z "$SERVICE" ]] && dokku_log_fail "Please specify a name for the service" + [[ -z "$SERVICE" ]] && dokku_log_fail "Please specify a valid name for the service" verify_service_name "$SERVICE" service_info "$SERVICE" "$INFO_FLAG" } diff --git a/subcommands/link b/subcommands/link index 4f94498..f3f276d 100755 --- a/subcommands/link +++ b/subcommands/link @@ -46,7 +46,7 @@ service-link-cmd() { declare SERVICE="$1" APP="$2" LINK_FLAGS_LIST="${@:3}" APP=${APP:="$DOKKU_APP_NAME"} - [[ -z "$SERVICE" ]] && dokku_log_fail "Please specify a name for the service" + [[ -z "$SERVICE" ]] && dokku_log_fail "Please specify a valid name for the service" [[ -z "$APP" ]] && dokku_log_fail "Please specify an app to run the command on" verify_app_name "$APP" verify_service_name "$SERVICE" diff --git a/subcommands/linked b/subcommands/linked index f5a1789..1fd94ab 100755 --- a/subcommands/linked +++ b/subcommands/linked @@ -14,7 +14,7 @@ service-linked-cmd() { declare SERVICE="$1" APP="$2" APP=${APP:="$DOKKU_APP_NAME"} - [[ -z "$SERVICE" ]] && dokku_log_fail "Please specify a name for the service" + [[ -z "$SERVICE" ]] && dokku_log_fail "Please specify a valid name for the service" [[ -z "$APP" ]] && dokku_log_fail "Please specify an app to run the command on" verify_app_name "$APP" verify_service_name "$SERVICE" diff --git a/subcommands/logs b/subcommands/logs index 01920bc..efa9f08 100755 --- a/subcommands/logs +++ b/subcommands/logs @@ -15,7 +15,7 @@ service-logs-cmd() { local cmd="$PLUGIN_COMMAND_PREFIX:logs" argv=("$@"); [[ ${argv[0]} == "$cmd" ]] && shift 1 declare SERVICE="$1" TAIL_FLAG="$2" - [[ -z "$SERVICE" ]] && dokku_log_fail "Please specify a name for the service" + [[ -z "$SERVICE" ]] && dokku_log_fail "Please specify a valid name for the service" verify_service_name "$SERVICE" service_logs "$SERVICE" "$TAIL_FLAG" } diff --git a/subcommands/promote b/subcommands/promote index d9167c0..06d0b37 100755 --- a/subcommands/promote +++ b/subcommands/promote @@ -27,7 +27,7 @@ service-promote-cmd() { declare SERVICE="$1" APP="$2" APP=${APP:="$DOKKU_APP_NAME"} - [[ -z "$SERVICE" ]] && dokku_log_fail "Please specify a name for the service" + [[ -z "$SERVICE" ]] && dokku_log_fail "Please specify a valid name for the service" [[ -z "$APP" ]] && dokku_log_fail "Please specify an app to run the command on" verify_service_name "$SERVICE" verify_app_name "$APP" diff --git a/subcommands/restart b/subcommands/restart index 315a4be..b6d5dae 100755 --- a/subcommands/restart +++ b/subcommands/restart @@ -12,7 +12,7 @@ service-restart-cmd() { local cmd="$PLUGIN_COMMAND_PREFIX:restart" argv=("$@"); [[ ${argv[0]} == "$cmd" ]] && shift 1 declare SERVICE="$1" - [[ -z "$SERVICE" ]] && dokku_log_fail "Please specify a name for the service" + [[ -z "$SERVICE" ]] && dokku_log_fail "Please specify a valid name for the service" verify_service_name "$SERVICE" service_stop "$SERVICE" service_start "$SERVICE" diff --git a/subcommands/start b/subcommands/start index 1db1e40..47fc913 100755 --- a/subcommands/start +++ b/subcommands/start @@ -12,7 +12,7 @@ service-start-cmd() { local cmd="$PLUGIN_COMMAND_PREFIX:start" argv=("$@"); [[ ${argv[0]} == "$cmd" ]] && shift 1 declare SERVICE="$1" - [[ -z "$SERVICE" ]] && dokku_log_fail "Please specify a name for the service" + [[ -z "$SERVICE" ]] && dokku_log_fail "Please specify a valid name for the service" verify_service_name "$SERVICE" service_start "$SERVICE" } diff --git a/subcommands/stop b/subcommands/stop index 77e52f4..59b98cc 100755 --- a/subcommands/stop +++ b/subcommands/stop @@ -12,7 +12,7 @@ service-stop-cmd() { local cmd="$PLUGIN_COMMAND_PREFIX:stop" argv=("$@"); [[ ${argv[0]} == "$cmd" ]] && shift 1 declare SERVICE="$1" - [[ -z "$SERVICE" ]] && dokku_log_fail "Please specify a name for the service" + [[ -z "$SERVICE" ]] && dokku_log_fail "Please specify a valid name for the service" verify_service_name "$SERVICE" service_stop "$SERVICE" } diff --git a/subcommands/unexpose b/subcommands/unexpose index 289d164..c821842 100755 --- a/subcommands/unexpose +++ b/subcommands/unexpose @@ -12,7 +12,7 @@ service-unexpose-cmd() { local cmd="$PLUGIN_COMMAND_PREFIX:unexpose" argv=("$@"); [[ ${argv[0]} == "$cmd" ]] && shift 1 declare SERVICE="$1" - [[ -z "$SERVICE" ]] && dokku_log_fail "Please specify a name for the service" + [[ -z "$SERVICE" ]] && dokku_log_fail "Please specify a valid name for the service" verify_service_name "$SERVICE" service_port_unexpose "$SERVICE" } diff --git a/subcommands/unlink b/subcommands/unlink index a58e9c7..487ecc1 100755 --- a/subcommands/unlink +++ b/subcommands/unlink @@ -15,7 +15,7 @@ service-unlink-cmd() { declare SERVICE="$1" APP="$2" APP=${APP:="$DOKKU_APP_NAME"} - [[ -z "$SERVICE" ]] && dokku_log_fail "Please specify a name for the service" + [[ -z "$SERVICE" ]] && dokku_log_fail "Please specify a valid name for the service" [[ -z "$APP" ]] && dokku_log_fail "Please specify an app to run the command on" verify_service_name "$SERVICE" verify_app_name "$APP" diff --git a/subcommands/upgrade b/subcommands/upgrade index 76f1a9b..800b15e 100755 --- a/subcommands/upgrade +++ b/subcommands/upgrade @@ -17,7 +17,7 @@ service-upgrade-cmd() { local cmd="$PLUGIN_COMMAND_PREFIX:upgrade" argv=("$@"); [[ ${argv[0]} == "$cmd" ]] && shift 1 declare SERVICE="$1" UPGRADE_FLAGS_LIST="${@:2}" - [[ -z "$SERVICE" ]] && dokku_log_fail "Please specify a name for the service" + [[ -z "$SERVICE" ]] && dokku_log_fail "Please specify a valid name for the service" verify_service_name "$SERVICE" local SERVICE_ROOT="$PLUGIN_DATA_ROOT/$SERVICE" diff --git a/tests/service_clone.bats b/tests/service_clone.bats index 658eb24..118d2a9 100755 --- a/tests/service_clone.bats +++ b/tests/service_clone.bats @@ -13,7 +13,7 @@ teardown() { @test "($PLUGIN_COMMAND_PREFIX:clone) error when there are no arguments" { run dokku "$PLUGIN_COMMAND_PREFIX:clone" - assert_contains "${lines[*]}" "Please specify a name for the service" + assert_contains "${lines[*]}" "Please specify a valid name for the service" } @test "($PLUGIN_COMMAND_PREFIX:clone) error when service does not exist" { diff --git a/tests/service_connect.bats b/tests/service_connect.bats index f114825..1d30ed8 100755 --- a/tests/service_connect.bats +++ b/tests/service_connect.bats @@ -13,7 +13,7 @@ teardown() { @test "($PLUGIN_COMMAND_PREFIX:connect) error when there are no arguments" { run dokku "$PLUGIN_COMMAND_PREFIX:connect" - assert_contains "${lines[*]}" "Please specify a name for the service" + assert_contains "${lines[*]}" "Please specify a valid name for the service" } @test "($PLUGIN_COMMAND_PREFIX:connect) error when service does not exist" { diff --git a/tests/service_connect_admin.bats b/tests/service_connect_admin.bats index f3398e6..82b022f 100644 --- a/tests/service_connect_admin.bats +++ b/tests/service_connect_admin.bats @@ -13,7 +13,7 @@ teardown() { @test "($PLUGIN_COMMAND_PREFIX:connect-admin) error when there are no arguments" { run dokku "$PLUGIN_COMMAND_PREFIX:connect-admin" - assert_contains "${lines[*]}" "Please specify a name for the service" + assert_contains "${lines[*]}" "Please specify a valid name for the service" } @test "($PLUGIN_COMMAND_PREFIX:connect-admin) error when service does not exist" { diff --git a/tests/service_create.bats b/tests/service_create.bats index 777441d..8d452e5 100755 --- a/tests/service_create.bats +++ b/tests/service_create.bats @@ -8,7 +8,7 @@ load test_helper @test "($PLUGIN_COMMAND_PREFIX:create) error when there are no arguments" { run dokku "$PLUGIN_COMMAND_PREFIX:create" - assert_contains "${lines[*]}" "Please specify a name for the service" + assert_contains "${lines[*]}" "Please specify a valid name for the service" } @test "($PLUGIN_COMMAND_PREFIX:create) error when there is an invalid name specified" { diff --git a/tests/service_destroy.bats b/tests/service_destroy.bats index 03f23c3..654e260 100755 --- a/tests/service_destroy.bats +++ b/tests/service_destroy.bats @@ -9,7 +9,7 @@ load test_helper @test "($PLUGIN_COMMAND_PREFIX:destroy) error when there are no arguments" { run dokku "$PLUGIN_COMMAND_PREFIX:destroy" - assert_contains "${lines[*]}" "Please specify a name for the service" + assert_contains "${lines[*]}" "Please specify a valid name for the service" } @test "($PLUGIN_COMMAND_PREFIX:destroy) error when container does not exist" { diff --git a/tests/service_export.bats b/tests/service_export.bats index 6c770d5..f760c66 100755 --- a/tests/service_export.bats +++ b/tests/service_export.bats @@ -13,7 +13,7 @@ teardown() { @test "($PLUGIN_COMMAND_PREFIX:export) error when there are no arguments" { run dokku "$PLUGIN_COMMAND_PREFIX:export" - assert_contains "${lines[*]}" "Please specify a name for the service" + assert_contains "${lines[*]}" "Please specify a valid name for the service" } @test "($PLUGIN_COMMAND_PREFIX:export) error when service does not exist" { diff --git a/tests/service_expose.bats b/tests/service_expose.bats index a293994..c791b22 100755 --- a/tests/service_expose.bats +++ b/tests/service_expose.bats @@ -11,7 +11,7 @@ teardown() { @test "($PLUGIN_COMMAND_PREFIX:expose) error when there are no arguments" { run dokku "$PLUGIN_COMMAND_PREFIX:expose" - assert_contains "${lines[*]}" "Please specify a name for the service" + assert_contains "${lines[*]}" "Please specify a valid name for the service" } @test "($PLUGIN_COMMAND_PREFIX:expose) error when service does not exist" { diff --git a/tests/service_import.bats b/tests/service_import.bats index d0f173b..64233bb 100755 --- a/tests/service_import.bats +++ b/tests/service_import.bats @@ -15,7 +15,7 @@ teardown() { @test "($PLUGIN_COMMAND_PREFIX:import) error when there are no arguments" { run dokku "$PLUGIN_COMMAND_PREFIX:import" - assert_contains "${lines[*]}" "Please specify a name for the service" + assert_contains "${lines[*]}" "Please specify a valid name for the service" } @test "($PLUGIN_COMMAND_PREFIX:import) error when service does not exist" { diff --git a/tests/service_info.bats b/tests/service_info.bats index ecc5202..d122107 100755 --- a/tests/service_info.bats +++ b/tests/service_info.bats @@ -11,7 +11,7 @@ teardown() { @test "($PLUGIN_COMMAND_PREFIX:info) error when there are no arguments" { run dokku "$PLUGIN_COMMAND_PREFIX:info" - assert_contains "${lines[*]}" "Please specify a name for the service" + assert_contains "${lines[*]}" "Please specify a valid name for the service" } @test "($PLUGIN_COMMAND_PREFIX:info) error when service does not exist" { diff --git a/tests/service_link.bats b/tests/service_link.bats index 57a32f3..c87933d 100755 --- a/tests/service_link.bats +++ b/tests/service_link.bats @@ -13,7 +13,7 @@ teardown() { @test "($PLUGIN_COMMAND_PREFIX:link) error when there are no arguments" { run dokku "$PLUGIN_COMMAND_PREFIX:link" - assert_contains "${lines[*]}" "Please specify a name for the service" + assert_contains "${lines[*]}" "Please specify a valid name for the service" } @test "($PLUGIN_COMMAND_PREFIX:link) error when the app argument is missing" { diff --git a/tests/service_logs.bats b/tests/service_logs.bats index eda210c..055cd1c 100755 --- a/tests/service_logs.bats +++ b/tests/service_logs.bats @@ -13,7 +13,7 @@ teardown() { @test "($PLUGIN_COMMAND_PREFIX:logs) error when there are no arguments" { run dokku "$PLUGIN_COMMAND_PREFIX:logs" - assert_contains "${lines[*]}" "Please specify a name for the service" + assert_contains "${lines[*]}" "Please specify a valid name for the service" } @test "($PLUGIN_COMMAND_PREFIX:logs) error when service does not exist" { diff --git a/tests/service_promote.bats b/tests/service_promote.bats index 4651ba4..4843f98 100755 --- a/tests/service_promote.bats +++ b/tests/service_promote.bats @@ -15,7 +15,7 @@ teardown() { @test "($PLUGIN_COMMAND_PREFIX:promote) error when there are no arguments" { run dokku "$PLUGIN_COMMAND_PREFIX:promote" - assert_contains "${lines[*]}" "Please specify a name for the service" + assert_contains "${lines[*]}" "Please specify a valid name for the service" } @test "($PLUGIN_COMMAND_PREFIX:promote) error when the app argument is missing" { diff --git a/tests/service_restart.bats b/tests/service_restart.bats index ab20d29..e97729d 100755 --- a/tests/service_restart.bats +++ b/tests/service_restart.bats @@ -11,7 +11,7 @@ teardown() { @test "($PLUGIN_COMMAND_PREFIX:restart) error when there are no arguments" { run dokku "$PLUGIN_COMMAND_PREFIX:restart" - assert_contains "${lines[*]}" "Please specify a name for the service" + assert_contains "${lines[*]}" "Please specify a valid name for the service" } @test "($PLUGIN_COMMAND_PREFIX:restart) error when service does not exist" { diff --git a/tests/service_start.bats b/tests/service_start.bats index 69a0852..9b7cae9 100755 --- a/tests/service_start.bats +++ b/tests/service_start.bats @@ -11,7 +11,7 @@ teardown() { @test "($PLUGIN_COMMAND_PREFIX:start) error when there are no arguments" { run dokku "$PLUGIN_COMMAND_PREFIX:start" - assert_contains "${lines[*]}" "Please specify a name for the service" + assert_contains "${lines[*]}" "Please specify a valid name for the service" } @test "($PLUGIN_COMMAND_PREFIX:start) error when service does not exist" { diff --git a/tests/service_stop.bats b/tests/service_stop.bats index 4b2f71b..95d5647 100755 --- a/tests/service_stop.bats +++ b/tests/service_stop.bats @@ -11,7 +11,7 @@ teardown() { @test "($PLUGIN_COMMAND_PREFIX:stop) error when there are no arguments" { run dokku "$PLUGIN_COMMAND_PREFIX:stop" - assert_contains "${lines[*]}" "Please specify a name for the service" + assert_contains "${lines[*]}" "Please specify a valid name for the service" } @test "($PLUGIN_COMMAND_PREFIX:stop) error when service does not exist" { diff --git a/tests/service_unexpose.bats b/tests/service_unexpose.bats index 02f0b8f..30153fd 100755 --- a/tests/service_unexpose.bats +++ b/tests/service_unexpose.bats @@ -11,7 +11,7 @@ teardown() { @test "($PLUGIN_COMMAND_PREFIX:unexpose) error when there are no arguments" { run dokku "$PLUGIN_COMMAND_PREFIX:unexpose" - assert_contains "${lines[*]}" "Please specify a name for the service" + assert_contains "${lines[*]}" "Please specify a valid name for the service" } @test "($PLUGIN_COMMAND_PREFIX:unexpose) error when service does not exist" { diff --git a/tests/service_unlink.bats b/tests/service_unlink.bats index 72d202f..2a42d7f 100755 --- a/tests/service_unlink.bats +++ b/tests/service_unlink.bats @@ -13,7 +13,7 @@ teardown() { @test "($PLUGIN_COMMAND_PREFIX:unlink) error when there are no arguments" { run dokku "$PLUGIN_COMMAND_PREFIX:unlink" - assert_contains "${lines[*]}" "Please specify a name for the service" + assert_contains "${lines[*]}" "Please specify a valid name for the service" } @test "($PLUGIN_COMMAND_PREFIX:unlink) error when the app argument is missing" {