MCPcopy Index your code
hub / github.com/ContainerSSH/ContainerSSH / RequestShell

Method RequestShell

e2e_framework_test.go:306–328  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

304}
305
306func (c *testContext) RequestShell() {
307 t := c.T
308 t.Helper()
309 c.lock.Lock()
310 defer c.lock.Unlock()
311 if c.channel == nil {
312 t.Fatalf("No channel opened.")
313 }
314 t.Logf("Starting shell...")
315
316 success, err := c.channel.SendRequest(
317 string(internalssh.RequestTypeShell),
318 true,
319 nil,
320 )
321 if err != nil {
322 t.Fatalf("Failed to send exec request. (%v)", err)
323 }
324 if !success {
325 t.Fatalf("Server rejected exec request. (%v)", err)
326 }
327 t.Logf("Started shell.")
328}
329
330func (c *testContext) AssertStdoutHas(output string) {
331 t := c.T

Callers

nothing calls this directly

Calls 2

FatalfMethod · 0.80
LogfMethod · 0.65

Tested by

no test coverage detected