fix #507 #509
@ -103,8 +103,7 @@ developer machine. The domain is then set to "default".`,
|
||||
|
||||
if _, err := client.New(name, timeout); err != nil {
|
||||
cleanUp(name)
|
||||
log.Debugf("ssh %s error: %s", name, sshPkg.Fatal(name, err))
|
||||
log.Fatalf("can't ssh to %s, make sure \"ssh %s\" works", name, name)
|
||||
log.Fatalf("%s error: %s", name, sshPkg.Fatal(name, err))
|
||||
}
|
||||
|
||||
if created {
|
||||
|
@ -89,7 +89,7 @@ func New(serverName string, opts ...Opt) (*client.Client, error) {
|
||||
|
||||
info, err := cl.Info(context.Background())
|
||||
if err != nil {
|
||||
return cl, sshPkg.Fatal(serverName, err)
|
||||
decentral1se marked this conversation as resolved
|
||||
return cl, fmt.Errorf("%s, make sure \"ssh %s\" works", sshPkg.Fatal(serverName, err), serverName)
|
||||
}
|
||||
|
||||
if info.Swarm.LocalNodeState == "inactive" {
|
||||
|
@ -51,6 +51,13 @@ teardown(){
|
||||
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
|
||||
@test "cleanup when cannot add server" {
|
||||
run $ABRA server add example.com
|
||||
|
Loading…
x
Reference in New Issue
Block a user
Is
sshPkg.Fatal
used anywhere else and/or should it be removed?It is still also in use in https://git.coopcloud.tech/toolshed/abra/src/branch/main/cli/server/add.go#L106 :)