MCPcopy Create free account
hub / github.com/cloudnative-pg/cloudnative-pg / Run

Function Run

tests/utils/run/run.go:87–96  ·  view source on GitHub ↗

Run executes a command and prints the output when terminates with an error

(command string)

Source from the content-addressed store, hash-verified

85
86// Run executes a command and prints the output when terminates with an error
87func Run(command string) (stdout string, stderr string, err error) {
88 stdout, stderr, err = Unchecked(command)
89
90 var exerr *exec.ExitError
91 if errors.As(err, &exerr) {
92 ginkgo.GinkgoWriter.Printf("RunCheck: %v\nExitCode: %v\n Out:\n%v\nErr:\n%v\n",
93 command, exerr.ExitCode(), stdout, stderr)
94 }
95 return stdout, stderr, err
96}

Callers 15

OnFunction · 0.92
OffFunction · 0.92
UncordonAllFunction · 0.92
DescribeKubernetesNodesFunction · 0.92
assertFastSwitchoverFunction · 0.92
scaling_test.goFile · 0.92
drain_node_test.goFile · 0.92

Calls 1

UncheckedFunction · 0.85

Tested by 2

assertFastSwitchoverFunction · 0.74
OfflineResizePVCFunction · 0.74