(t *testing.T)
| 31 | } |
| 32 | |
| 33 | func TestCreateTestKnownHosts(t *testing.T) { |
| 34 | dir := t.TempDir() |
| 35 | content := "192.168.1.1 ssh-ed25519 AAAA..." |
| 36 | path := CreateTestKnownHosts(t, dir, content) |
| 37 | assert.Equal(t, filepath.Join(dir, "known_hosts"), path) |
| 38 | |
| 39 | result := ReadFile(t, path) |
| 40 | assert.Equal(t, content, result) |
| 41 | } |
| 42 | |
| 43 | func TestCreateTestKnownHosts_EmptyContent(t *testing.T) { |
| 44 | dir := t.TempDir() |
nothing calls this directly
no test coverage detected