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

Function TestSelectServerCache_NoMatch

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

Source from the content-addressed store, hash-verified

86}
87
88func TestSelectServerCache_NoMatch(t *testing.T) {
89 conf := newTestConfig()
90
91 // IP that doesn't exist
92 server, index, found := SelectServerCache("", "10.10.10.10", conf)
93 assert.False(t, found)
94 assert.Nil(t, server)
95 assert.Equal(t, 0, index)
96
97 // User that doesn't match the IP entries
98 server, index, found = SelectServerCache("nonexistent", "192.168.1.1", conf)
99 assert.False(t, found)
100 assert.Nil(t, server)
101 assert.Equal(t, 0, index)
102}
103
104func TestSelectServerCache_IPMatchesButUserDoesNot(t *testing.T) {
105 conf := newTestConfig()

Callers

nothing calls this directly

Calls 2

newTestConfigFunction · 0.85
SelectServerCacheFunction · 0.85

Tested by

no test coverage detected