MCPcopy Create free account
hub / github.com/digitalocean/go-libvirt / TestAddStream

Function TestAddStream

rpc_test.go:256–269  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

254 l.deregister(id)
255 if _, ok := l.callbacks[id]; ok {
256 t.Error("expected callback to deregister")
257 }
258}
259
260func TestAddStream(t *testing.T) {
261 id := int32(1)
262
263 l := &Libvirt{}
264 l.events = make(map[int32]*event.Stream)
265
266 stream := event.NewStream(0, id)
267 defer stream.Shutdown()
268
269 l.addStream(stream)
270 if _, ok := l.events[id]; !ok {
271 t.Error("expected event stream to exist")
272 }

Callers

nothing calls this directly

Calls 4

ShutdownMethod · 0.95
addStreamMethod · 0.95
NewStreamFunction · 0.92
ErrorMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…