mirror of https://github.com/docker/docs.git
Merge pull request #1957 from kacole2/improveHostnameError
clarified hostname error with valid characters
This commit is contained in:
commit
074d7e3add
|
@ -6,7 +6,7 @@ import (
|
|||
)
|
||||
|
||||
var (
|
||||
ErrInvalidHostname = errors.New("Invalid hostname specified")
|
||||
ErrInvalidHostname = errors.New("Invalid hostname specified. Allowed hostname chars are: 0-9a-zA-Z . -")
|
||||
ErrUnknownProviderType = errors.New("Unknown hypervisor type")
|
||||
)
|
||||
|
||||
|
|
|
@ -19,25 +19,25 @@ load ${BASE_TEST_DIR}/helpers.bash
|
|||
run machine create -d none --url none ∞
|
||||
last=$((${#lines[@]} - 1))
|
||||
[ "$status" -eq 1 ]
|
||||
[[ ${lines[$last]} == "Error creating machine: Invalid hostname specified" ]]
|
||||
[[ ${lines[$last]} == "Error creating machine: Invalid hostname specified. Allowed hostname chars are: 0-9a-zA-Z . -" ]]
|
||||
}
|
||||
|
||||
@test "none: create with invalid name fails 'machine create -d none --url none -'" {
|
||||
run machine create -d none --url none -
|
||||
[ "$status" -eq 1 ]
|
||||
[[ ${lines[0]} == "Error creating machine: Invalid hostname specified" ]]
|
||||
[[ ${lines[0]} == "Error creating machine: Invalid hostname specified. Allowed hostname chars are: 0-9a-zA-Z . -" ]]
|
||||
}
|
||||
|
||||
@test "none: create with invalid name fails 'machine create -d none --url none .'" {
|
||||
run machine create -d none --url none .
|
||||
[ "$status" -eq 1 ]
|
||||
[[ ${lines[0]} == "Error creating machine: Invalid hostname specified" ]]
|
||||
[[ ${lines[0]} == "Error creating machine: Invalid hostname specified. Allowed hostname chars are: 0-9a-zA-Z . -" ]]
|
||||
}
|
||||
|
||||
@test "none: create with invalid name fails 'machine create -d none --url none ..'" {
|
||||
run machine create -d none --url none ..
|
||||
[ "$status" -eq 1 ]
|
||||
[[ ${lines[0]} == "Error creating machine: Invalid hostname specified" ]]
|
||||
[[ ${lines[0]} == "Error creating machine: Invalid hostname specified. Allowed hostname chars are: 0-9a-zA-Z . -" ]]
|
||||
}
|
||||
|
||||
@test "none: create with weird but valid name succeeds 'machine create -d none --url none a'" {
|
||||
|
|
Loading…
Reference in New Issue