MCPcopy
hub / github.com/ContainerSSH/ContainerSSH / SendStdin

Method SendStdin

e2e_framework_test.go:355–370  ·  view source on GitHub ↗
(data string)

Source from the content-addressed store, hash-verified

353}
354
355func (c *testContext) SendStdin(data string) {
356 t := c.T
357 t.Helper()
358 c.lock.Lock()
359 defer c.lock.Unlock()
360 if c.channel == nil {
361 t.Fatalf("No channel opened.")
362 }
363 t.Logf("Sending stdin data...")
364
365 if _, err := c.channel.Write([]byte(data)); err != nil {
366 t.Fatalf("Failed to send stdin data (%v)", err)
367 }
368
369 t.Logf("Sent stdin data.")
370}
371
372func (c *testContext) CloseChannel() {
373 t := c.T

Callers

nothing calls this directly

Calls 3

FatalfMethod · 0.80
LogfMethod · 0.65
WriteMethod · 0.65

Tested by

no test coverage detected