(t testing.TB, script string)
| 34 | type bashTester struct{} |
| 35 | |
| 36 | func (b bashTester) RunInteractiveShell(t testing.TB, script string) string { |
| 37 | out, err := b.RunInteractiveShellRelaxed(t, "set -emo pipefail\n"+script) |
| 38 | if err != nil { |
| 39 | _, filename, line, _ := runtime.Caller(1) |
| 40 | require.NoError(t, err, fmt.Sprintf("error when running command at %s:%dv", filename, line)) |
| 41 | } |
| 42 | return out |
| 43 | } |
| 44 | |
| 45 | func (b bashTester) RunInteractiveShellRelaxed(t testing.TB, script string) (string, error) { |
| 46 | cmd := exec.Command("bash", "-i") |