(t *testing.T)
| 102 | } |
| 103 | |
| 104 | func 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 | |
| 114 | func TestSelectServerCache_EmptyServerList(t *testing.T) { |
| 115 | conf := &MainConfig{} |
nothing calls this directly
no test coverage detected