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

Function TestUpdateConfigAtPath_InvalidPath

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

Source from the content-addressed store, hash-verified

192}
193
194func TestUpdateConfigAtPath_InvalidPath(t *testing.T) {
195 // Use a path in a non-existent directory that cannot be created
196 // (e.g., under /proc on Linux or /dev on macOS if restricted)
197 conf := &MainConfig{}
198 conf.Main.Ports = []string{"22"}
199
200 err := UpdateConfigAtPath("/nonexistent_root_dir/subdir/tryssh.db", conf)
201 assert.Error(t, err)
202}
203
204func TestGenerateConfig(t *testing.T) {
205 dir := testutil.TempDir(t)

Callers

nothing calls this directly

Calls 1

UpdateConfigAtPathFunction · 0.85

Tested by

no test coverage detected