MCPcopy Index your code
hub / github.com/docker/docker-agent / TestWriteUniqueFile_WritesFirstCandidate

Function TestWriteUniqueFile_WritesFirstCandidate

cmd/root/record_tui_test.go:27–37  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

25}
26
27func TestWriteUniqueFile_WritesFirstCandidate(t *testing.T) {
28 base := filepath.Join(t.TempDir(), "rec")
29
30 path, err := writeUniqueFile(base, []byte("generated"))
31 require.NoError(t, err)
32
33 assert.Equal(t, base+"_test.go", path)
34 got, err := os.ReadFile(path)
35 require.NoError(t, err)
36 assert.Equal(t, "generated", string(got))
37}

Callers

nothing calls this directly

Calls 2

writeUniqueFileFunction · 0.85
ReadFileMethod · 0.80

Tested by

no test coverage detected