MCPcopy Create free account
hub / github.com/devnullvoid/pvetui / TestSSHClient_WithExecutor

Function TestSSHClient_WithExecutor

internal/ssh/client_test.go:28–38  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

26}
27
28func TestSSHClient_WithExecutor(t *testing.T) {
29 me := &mockExecutor{}
30 client, err := NewSSHClient("192.0.2.1", "testuser", "", WithExecutor(me))
31 require.NoError(t, err)
32
33 err = client.Shell()
34 require.NoError(t, err)
35 require.Equal(t, 1, me.called)
36 require.Equal(t, "ssh", me.lastName)
37 require.Equal(t, []string{"testuser@192.0.2.1"}, me.lastArgs)
38}
39
40func TestExecuteLXCShellWith_StandardContainer(t *testing.T) {
41 me := &mockExecutor{}

Callers

nothing calls this directly

Calls 3

ShellMethod · 0.95
WithExecutorFunction · 0.85
NewSSHClientFunction · 0.70

Tested by

no test coverage detected