MCPcopy
hub / github.com/hashicorp/memberlist / TestCreate_invalidLoggerSettings

Function TestCreate_invalidLoggerSettings

memberlist_test.go:322–333  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

320}
321
322func TestCreate_invalidLoggerSettings(t *testing.T) {
323 c := DefaultLANConfig()
324 c.BindAddr = getBindAddr().String()
325 c.Logger = log.New(io.Discard, "", log.LstdFlags)
326 c.LogOutput = io.Discard
327
328 m, err := Create(c)
329 if err == nil {
330 require.NoError(t, m.Shutdown())
331 t.Fatal("Memberlist should not allow both LogOutput and Logger to be set, but it did not raise an error")
332 }
333}
334
335func TestCreate(t *testing.T) {
336 c := testConfig(t)

Callers

nothing calls this directly

Calls 6

DefaultLANConfigFunction · 0.85
getBindAddrFunction · 0.85
CreateFunction · 0.85
FatalMethod · 0.80
ShutdownMethod · 0.65
StringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…