diff --git a/server.go b/server.go index e2e74276..e1349991 100644 --- a/server.go +++ b/server.go @@ -304,13 +304,13 @@ func Serve(opts *ServeConfig) { certPEM, keyPEM, err := generateCert() if err != nil { - logger.Error("failed to generate client certificate", "error", err) + logger.Error("failed to generate server certificate", "error", err) panic(err) } cert, err := tls.X509KeyPair(certPEM, keyPEM) if err != nil { - logger.Error("failed to parse client certificate", "error", err) + logger.Error("failed to parse server certificate", "error", err) panic(err) } diff --git a/server_test.go b/server_test.go index c8a28593..1aaa0b8d 100644 --- a/server_test.go +++ b/server_test.go @@ -117,6 +117,11 @@ func TestServer_testMode_AutoMTLS(t *testing.T) { t.Fatalf("err: %s", err) } + // Pinging should work + if err := client.Ping(); err != nil { + t.Fatalf("should not err: %s", err) + } + // Grab the impl raw, err := client.Dispense("test") if err != nil { @@ -140,11 +145,6 @@ func TestServer_testMode_AutoMTLS(t *testing.T) { t.Fatal("invalid response", err) } - // Pinging should work - if err := client.Ping(); err != nil { - t.Fatalf("should not err: %s", err) - } - c.Kill() // Canceling should cause an exit cancel()