MCPcopy
hub / github.com/kubernetes/test-infra / TestOutputOutputs

Function TestOutputOutputs

kubetest/process/process_test.go:356–369  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

354}
355
356func TestOutputOutputs(t *testing.T) {
357 interrupt := time.NewTimer(time.Duration(1) * time.Second)
358 terminate := time.NewTimer(time.Duration(1) * time.Second)
359 c := NewControl(time.Duration(1)*time.Second, interrupt, terminate, false)
360
361 b, err := c.Output(exec.Command("echo", "hello world"))
362 txt := string(b)
363 if err != nil {
364 t.Fatalf("failed to echo: %v", err)
365 }
366 if !strings.Contains(txt, "hello world") {
367 t.Errorf("output() did not echo hello world: %v", txt)
368 }
369}

Callers

nothing calls this directly

Calls 2

OutputMethod · 0.95
NewControlFunction · 0.85

Tested by

no test coverage detected