Commit 8039a712 authored by Matthew Holt's avatar Matthew Holt

telemetry: Remove a metric, clarify another, and fix tests

parent 33aeb1cb
......@@ -121,9 +121,7 @@ func (cfg *Config) GetCertificate(clientHello *tls.ClientHelloInfo) (*tls.Certif
// })
cert, err := cfg.getCertDuringHandshake(strings.ToLower(clientHello.ServerName), true, true)
if err == nil {
go telemetry.Increment("tls_handshake_count")
} else {
go telemetry.Append("tls_handshake_error", err.Error())
go telemetry.Increment("tls_handshake_count") // TODO: This is a "best guess" for now, we need something listener-level
}
return &cert.Certificate, err
}
......
......@@ -31,7 +31,7 @@ func TestInit(t *testing.T) {
t.Errorf("Second call to Init should have panicked")
}
}()
Init(id) // should panic
Init(id, nil) // should panic
}
func TestInitEmptyUUID(t *testing.T) {
......@@ -41,7 +41,7 @@ func TestInitEmptyUUID(t *testing.T) {
t.Errorf("Call to Init with empty UUID should have panicked")
}
}()
Init(uuid.UUID([16]byte{}))
Init(uuid.UUID([16]byte{}), nil)
}
func TestSet(t *testing.T) {
......@@ -92,7 +92,7 @@ func doInit(t *testing.T) uuid.UUID {
if err != nil {
t.Fatalf("Could not make UUID: %v", err)
}
Init(id)
Init(id, nil)
return id
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment