(t *testing.T)
| 234 | } |
| 235 | |
| 236 | func 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 | |
| 248 | func TestLoadConfig(t *testing.T) { |
| 249 | // Save and restore defaults |
nothing calls this directly
no test coverage detected