(t *testing.T)
| 56 | } |
| 57 | |
| 58 | func Test_SSHExecutor_WithDir(t *testing.T) { |
| 59 | if !isSSHTestsEnabled() { |
| 60 | return |
| 61 | } |
| 62 | |
| 63 | s := createExecutor() |
| 64 | |
| 65 | test := TestCase{ |
| 66 | Command: CommandUnderTest{ |
| 67 | Cmd: "echo $LC_TEST_KEY1; echo $LC_TEST_KEY2", |
| 68 | Env: map[string]string{ |
| 69 | "LC_TEST_KEY1": "ENV_VALUE1", |
| 70 | "LC_TEST_KEY2": "ENV_VALUE2", |
| 71 | }, |
| 72 | }, |
| 73 | } |
| 74 | got := s.Execute(test) |
| 75 | |
| 76 | assert.True(t, got.ValidationResult.Success) |
| 77 | assert.Equal(t, "ENV_VALUE1\nENV_VALUE2", got.TestCase.Result.Stdout) |
| 78 | assert.Equal(t, 0, got.TestCase.Result.ExitCode) |
| 79 | } |
| 80 | |
| 81 | func Test_SSHExecutor_ExitCode(t *testing.T) { |
| 82 | if !isSSHTestsEnabled() { |
nothing calls this directly
no test coverage detected