MCPcopy Create free account
hub / github.com/encodeous/nylon / TestStartStop

Function TestStartStop

integration/basic_test.go:14–30  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

12)
13
14func TestStartStop(t *testing.T) {
15 defer goleak.VerifyNone(t)
16 vh := &VirtualHarness{}
17 vh.NewNode("node1", "10.0.0.1/32")
18 vh.NewNode("node2", "10.0.0.2/32")
19 vh.NewNode("node3", "10.0.0.3/32")
20 vh.Central.Graph = []string{
21 "node1, node2, node3",
22 }
23 errs := vh.Start()
24 select {
25 case <-time.After(1000 * time.Millisecond):
26 case err := <-errs:
27 t.Error(err)
28 }
29 vh.Stop()
30}
31
32func TestSimplePing(t *testing.T) {
33 defer goleak.VerifyNone(t)

Callers

nothing calls this directly

Calls 5

NewNodeMethod · 0.95
StartMethod · 0.95
StopMethod · 0.95
AfterMethod · 0.80
ErrorMethod · 0.45

Tested by

no test coverage detected