MCPcopy Index your code
hub / github.com/docker/cli / TestNewCIDFileWhenFileAlreadyExists

Function TestNewCIDFileWhenFileAlreadyExists

cli/command/container/create_test.go:37–43  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

35}
36
37func TestNewCIDFileWhenFileAlreadyExists(t *testing.T) {
38 tempfile := fs.NewFile(t, "test-cid-file")
39 defer tempfile.Remove()
40
41 _, err := newCIDFile(tempfile.Path())
42 assert.ErrorContains(t, err, "container ID file found")
43}
44
45func TestCIDFileCloseWithNoWrite(t *testing.T) {
46 // Closing should remove the file if it was not written to.

Callers

nothing calls this directly

Calls 3

newCIDFileFunction · 0.85
RemoveMethod · 0.65
PathMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…