MCPcopy
hub / github.com/kubernetes/node-problem-detector / RunCommand

Method RunCommand

test/e2e/lib/gce/instance.go:142–147  ·  view source on GitHub ↗

RunCommand runs a command on the GCE instance and returns the command result.

(cmd string)

Source from the content-addressed store, hash-verified

140
141// RunCommand runs a command on the GCE instance and returns the command result.
142func (ins *Instance) RunCommand(cmd string) ssh.Result {
143 if ins.ExternalIP == "" {
144 ins.populateExternalIP()
145 }
146 return ssh.Run(cmd, ins.ExternalIP, ins.SshUser, ins.SshKey)
147}
148
149// RunCommand runs a command on the GCE instance and returns the command result, and fails the test when the command failed.
150func (ins *Instance) RunCommandOrFail(cmd string) ssh.Result {

Callers 4

RunCommandOrFailMethod · 0.95
SetupNPDFunction · 0.80
FetchNPDMetricsFunction · 0.80

Calls 2

populateExternalIPMethod · 0.95
RunFunction · 0.92

Tested by

no test coverage detected