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

Function TestCreateTestConfigFile

testutil/helpers_test.go:17–25  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

15}
16
17func TestCreateTestConfigFile(t *testing.T) {
18 dir := t.TempDir()
19 content := "main:\n ports:\n - \"22\""
20 path := CreateTestConfigFile(t, dir, content)
21 assert.Equal(t, filepath.Join(dir, "tryssh.db"), path)
22
23 result := ReadFile(t, path)
24 assert.Equal(t, content, result)
25}
26
27func TestCreateTestConfigFile_EmptyContent(t *testing.T) {
28 dir := t.TempDir()

Callers

nothing calls this directly

Calls 2

CreateTestConfigFileFunction · 0.85
ReadFileFunction · 0.70

Tested by

no test coverage detected