MCPcopy Create free account
hub / github.com/commander-cli/commander / Test_SSHExecutor

Function Test_SSHExecutor

pkg/runtime/ssh_executor_linux_test.go:36–56  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

34}
35
36func Test_SSHExecutor(t *testing.T) {
37 if !isSSHTestsEnabled() {
38 return
39 }
40
41 s := createExecutor()
42
43 test := TestCase{
44 Command: CommandUnderTest{
45 Cmd: "echo test",
46 },
47 Expected: Expected{
48 ExitCode: 0,
49 Stdout: ExpectedOut{Exactly: "test"},
50 },
51 }
52 got := s.Execute(test)
53
54 assert.True(t, got.ValidationResult.Success)
55 assert.Equal(t, "test", got.TestCase.Result.Stdout)
56}
57
58func Test_SSHExecutor_WithDir(t *testing.T) {
59 if !isSSHTestsEnabled() {

Callers

nothing calls this directly

Calls 3

isSSHTestsEnabledFunction · 0.85
createExecutorFunction · 0.85
ExecuteMethod · 0.65

Tested by

no test coverage detected