(t *testing.T)
| 71 | } |
| 72 | |
| 73 | func TestCIDFileCloseWithWrite(t *testing.T) { |
| 74 | tempdir := fs.NewDir(t, "test-cid-file") |
| 75 | defer tempdir.Remove() |
| 76 | |
| 77 | path := tempdir.Join("cidfile") |
| 78 | file, err := newCIDFile(path) |
| 79 | assert.NilError(t, err) |
| 80 | |
| 81 | content := "id" |
| 82 | assert.NilError(t, file.Write(content)) |
| 83 | |
| 84 | actual, err := os.ReadFile(path) |
| 85 | assert.NilError(t, err) |
| 86 | assert.Check(t, is.Equal(content, string(actual))) |
| 87 | |
| 88 | assert.NilError(t, file.Close()) |
| 89 | _, err = os.Stat(path) |
| 90 | assert.NilError(t, err) |
| 91 | } |
| 92 | |
| 93 | func TestCreateContainerImagePullPolicy(t *testing.T) { |
| 94 | const ( |
nothing calls this directly
no test coverage detected
searching dependent graphs…