(t *testing.T)
| 49 | } |
| 50 | |
| 51 | func TestSelectServerCache_MatchingIP(t *testing.T) { |
| 52 | conf := newTestConfig() |
| 53 | |
| 54 | // Search with IP only (empty user) -- should return the first matching IP |
| 55 | server, index, found := SelectServerCache("", "192.168.1.1", conf) |
| 56 | assert.True(t, found) |
| 57 | assert.NotNil(t, server) |
| 58 | assert.Equal(t, 0, index) |
| 59 | assert.Equal(t, "192.168.1.1", server.IP) |
| 60 | assert.Equal(t, "root", server.User) |
| 61 | } |
| 62 | |
| 63 | func TestSelectServerCache_MatchingIPAndUser(t *testing.T) { |
| 64 | conf := newTestConfig() |
nothing calls this directly
no test coverage detected