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

Function TestSelectServerCache_IPMatchesButUserDoesNot

pkg/config/cache_test.go:104–112  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

102}
103
104func TestSelectServerCache_IPMatchesButUserDoesNot(t *testing.T) {
105 conf := newTestConfig()
106
107 // 10.0.0.1 exists with user "deploy", but we search for "root"
108 server, index, found := SelectServerCache("root", "10.0.0.1", conf)
109 assert.False(t, found)
110 assert.Nil(t, server)
111 assert.Equal(t, 0, index)
112}
113
114func TestSelectServerCache_EmptyServerList(t *testing.T) {
115 conf := &MainConfig{}

Callers

nothing calls this directly

Calls 2

newTestConfigFunction · 0.85
SelectServerCacheFunction · 0.85

Tested by

no test coverage detected