MCPcopy Create free account
hub / github.com/containerd/nerdctl / minimalRootfsTar

Function minimalRootfsTar

cmd/nerdctl/image/image_import_linux_test.go:40–46  ·  view source on GitHub ↗

minimalRootfsTar returns a valid tar archive with no files.

(t *testing.T)

Source from the content-addressed store, hash-verified

38
39// minimalRootfsTar returns a valid tar archive with no files.
40func minimalRootfsTar(t *testing.T) *bytes.Buffer {
41 t.Helper()
42 buf := new(bytes.Buffer)
43 tw := tar.NewWriter(buf)
44 assert.NilError(t, tw.Close())
45 return buf
46}
47
48func TestImageImportErrors(t *testing.T) {
49 nerdtest.Setup()

Callers 1

TestImageImportFunction · 0.85

Calls 2

HelperMethod · 0.65
CloseMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…