RunCommand runs a command on the GCE instance and returns the command result, and fails the test when the command failed.
(cmd string)
| 148 | |
| 149 | // RunCommand runs a command on the GCE instance and returns the command result, and fails the test when the command failed. |
| 150 | func (ins *Instance) RunCommandOrFail(cmd string) ssh.Result { |
| 151 | result := ins.RunCommand(cmd) |
| 152 | Expect(result.SSHError).ToNot(HaveOccurred(), "SSH-ing to the instance failed: %v\n", result) |
| 153 | Expect(result.Code).To(Equal(0), "Running command failed: %v\n", result) |
| 154 | return result |
| 155 | } |
| 156 | |
| 157 | // PushFile pushes a local file to a GCE instance. |
| 158 | func (ins *Instance) PushFile(srcPath, destPath string) error { |
no test coverage detected