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

Function TestResolveAlias_ExistingAlias

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

Source from the content-addressed store, hash-verified

122}
123
124func TestResolveAlias_ExistingAlias(t *testing.T) {
125 conf := newTestConfig()
126
127 result := ResolveAlias("server1", conf)
128 assert.Equal(t, "192.168.1.1", result)
129
130 result = ResolveAlias("server2", conf)
131 assert.Equal(t, "192.168.1.2", result)
132
133 result = ResolveAlias("server1-admin", conf)
134 assert.Equal(t, "192.168.1.1", result)
135}
136
137func TestResolveAlias_NonExistingAlias(t *testing.T) {
138 conf := newTestConfig()

Callers

nothing calls this directly

Calls 2

newTestConfigFunction · 0.85
ResolveAliasFunction · 0.85

Tested by

no test coverage detected