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

Function TestLoadConfigFromPath_EmptyConfigFile

pkg/config/loader_test.go:236–246  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

234}
235
236func TestLoadConfigFromPath_EmptyConfigFile(t *testing.T) {
237 dir := testutil.TempDir(t)
238 configPath := testutil.CreateTestConfigFile(t, dir, "")
239 knownHostsPath := filepath.Join(dir, "known_hosts")
240
241 conf, err := LoadConfigFromPath(configPath, knownHostsPath)
242 assert.NoError(t, err)
243 assert.NotNil(t, conf)
244 assert.Empty(t, conf.Main.Ports)
245 assert.Empty(t, conf.Main.Users)
246}
247
248func TestLoadConfig(t *testing.T) {
249 // Save and restore defaults

Callers

nothing calls this directly

Calls 3

TempDirFunction · 0.92
CreateTestConfigFileFunction · 0.92
LoadConfigFromPathFunction · 0.85

Tested by

no test coverage detected