MCPcopy
hub / github.com/ContainerSSH/ContainerSSH / CloseChannel

Method CloseChannel

e2e_framework_test.go:372–389  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

370}
371
372func (c *testContext) CloseChannel() {
373 t := c.T
374 t.Helper()
375 c.lock.Lock()
376 defer c.lock.Unlock()
377 if c.channel == nil {
378 t.Fatalf("No channel opened.")
379 }
380 t.Logf("Closing channel...")
381
382 if err := c.channel.Close(); err != nil && !errors.Is(err, io.EOF) {
383 t.Fatalf("Failed to close channel. (%v)", err)
384 }
385
386 c.channel = nil
387
388 t.Logf("Closed channel.")
389}
390
391func (c *testContext) Run(name string, f func(t T)) bool {
392 c.T.Helper()

Callers

nothing calls this directly

Calls 3

FatalfMethod · 0.80
LogfMethod · 0.65
CloseMethod · 0.65

Tested by

no test coverage detected