MCPcopy Create free account
hub / github.com/Driver-C/tryssh / TestSSHController_TryLogin_EmptyUser

Function TestSSHController_TryLogin_EmptyUser

pkg/control/ssh_test.go:101–110  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

99}
100
101func TestSSHController_TryLogin_EmptyUser(t *testing.T) {
102 cfg := newTestMainConfig()
103 ctrl := NewSSHController("192.168.1.2", cfg)
104
105 // When user is empty, SelectServerCache returns any matching IP
106 server, idx, found := config.SelectServerCache("", ctrl.targetIP, ctrl.configuration)
107 assert.True(t, found)
108 assert.Equal(t, 1, idx)
109 assert.Equal(t, "192.168.1.2", server.IP)
110}
111
112func TestSSHController_FieldDefaults(t *testing.T) {
113 cfg := newTestMainConfig()

Callers

nothing calls this directly

Calls 3

SelectServerCacheFunction · 0.92
newTestMainConfigFunction · 0.85
NewSSHControllerFunction · 0.85

Tested by

no test coverage detected