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

Function TestCreate_keyringOnly

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

Source from the content-addressed store, hash-verified

272}
273
274func TestCreate_keyringOnly(t *testing.T) {
275 c := DefaultLANConfig()
276 c.BindAddr = getBindAddr().String()
277
278 keyring, err := NewKeyring(nil, make([]byte, 16))
279 require.NoError(t, err)
280 c.Keyring = keyring
281
282 m, err := Create(c)
283 require.NoError(t, err)
284 defer func() {
285 if err := m.Shutdown(); err != nil {
286 t.Fatal(err)
287 }
288 }()
289
290 if !m.config.EncryptionEnabled() {
291 t.Fatalf("Expected encryption to be enabled")
292 }
293}
294
295func TestCreate_keyringAndSecretKey(t *testing.T) {
296 c := DefaultLANConfig()

Callers

nothing calls this directly

Calls 9

DefaultLANConfigFunction · 0.85
getBindAddrFunction · 0.85
NewKeyringFunction · 0.85
CreateFunction · 0.85
FatalMethod · 0.80
EncryptionEnabledMethod · 0.80
FatalfMethod · 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…