MCPcopy
hub / github.com/grpc/grpc-go / TestTLSOverrideServerName

Method TestTLSOverrideServerName

experimental/credentials/credentials_test.go:44–51  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

42}
43
44func (s) TestTLSOverrideServerName(t *testing.T) {
45 expectedServerName := "server.name"
46 c := NewTLSWithALPNDisabled(nil)
47 c.OverrideServerName(expectedServerName)
48 if c.Info().ServerName != expectedServerName {
49 t.Fatalf("c.Info().ServerName = %v, want %v", c.Info().ServerName, expectedServerName)
50 }
51}
52
53func (s) TestTLSClone(t *testing.T) {
54 expectedServerName := "server.name"

Callers

nothing calls this directly

Calls 4

NewTLSWithALPNDisabledFunction · 0.85
OverrideServerNameMethod · 0.65
InfoMethod · 0.65
FatalfMethod · 0.65

Tested by

no test coverage detected