Register hosts under Containers/VMs/Docker with encrypted key storage, and require re-authentication for sensitive account changes.
20 lines
394 B
Go
20 lines
394 B
Go
package auth
|
|
|
|
import (
|
|
"testing"
|
|
)
|
|
|
|
func TestTestSSHConnectionRejectsEmptyHost(t *testing.T) {
|
|
err := TestSSHConnection("", "clustercanvas", "not-a-key", "")
|
|
if err == nil {
|
|
t.Fatal("expected error")
|
|
}
|
|
}
|
|
|
|
func TestTestSSHConnectionRejectsInvalidKey(t *testing.T) {
|
|
err := TestSSHConnection("127.0.0.1", "clustercanvas", "not-a-key", "")
|
|
if err == nil {
|
|
t.Fatal("expected error")
|
|
}
|
|
}
|