This commit is contained in:
parent
d09a19a385
commit
be9f613112
@ -103,8 +103,7 @@ developer machine. The domain is then set to "default".`,
|
|||||||
|
|
||||||
if _, err := client.New(name, timeout); err != nil {
|
if _, err := client.New(name, timeout); err != nil {
|
||||||
cleanUp(name)
|
cleanUp(name)
|
||||||
log.Debugf("ssh %s error: %s", name, sshPkg.Fatal(name, err))
|
log.Fatalf("%s error: %s", name, sshPkg.Fatal(name, err))
|
||||||
log.Fatalf("can't ssh to %s, make sure \"ssh %s\" works", name, name)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if created {
|
if created {
|
||||||
|
@ -89,7 +89,7 @@ func New(serverName string, opts ...Opt) (*client.Client, error) {
|
|||||||
|
|
||||||
info, err := cl.Info(context.Background())
|
info, err := cl.Info(context.Background())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return cl, sshPkg.Fatal(serverName, err)
|
return cl, fmt.Errorf("%s, make sure \"ssh %s\" works", sshPkg.Fatal(serverName, err), serverName)
|
||||||
}
|
}
|
||||||
|
|
||||||
if info.Swarm.LocalNodeState == "inactive" {
|
if info.Swarm.LocalNodeState == "inactive" {
|
||||||
|
@ -51,6 +51,13 @@ teardown(){
|
|||||||
assert_output --partial 'swarm mode not enabled on local server'
|
assert_output --partial 'swarm mode not enabled on local server'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@test "create notexisting server fails with could not resolve hostname" {
|
||||||
|
run $ABRA server add notexisting
|
||||||
|
assert_failure
|
||||||
|
assert_not_exists "$ABRA_DIR/servers/default"
|
||||||
|
assert_output --partial 'could not resolve hostname for'
|
||||||
|
}
|
||||||
|
|
||||||
# bats test_tags=slow
|
# bats test_tags=slow
|
||||||
@test "cleanup when cannot add server" {
|
@test "cleanup when cannot add server" {
|
||||||
run $ABRA server add example.com
|
run $ABRA server add example.com
|
||||||
|
Loading…
x
Reference in New Issue
Block a user