MCPcopy Index your code
hub / github.com/containerd/containerd / testMakeFileSystem

Function testMakeFileSystem

plugins/snapshots/devmapper/pool_device_test.go:235–249  ·  view source on GitHub ↗
(t *testing.T, pool *PoolDevice)

Source from the content-addressed store, hash-verified

233}
234
235func testMakeFileSystem(t *testing.T, pool *PoolDevice) {
236 devicePath := dmsetup.GetFullDevicePath(thinDevice1)
237 args := []string{
238 "-E",
239 "nodiscard,lazy_itable_init=0,lazy_journal_init=0",
240 devicePath,
241 }
242
243 output, err := exec.Command("mkfs.ext4", args...).CombinedOutput()
244 assert.Nil(t, err, "failed to make filesystem on '%s': %s", thinDevice1, string(output))
245
246 usage, err := pool.GetUsage(thinDevice1)
247 assert.NoError(t, err)
248 assert.True(t, usage > 0)
249}
250
251func testCreateSnapshot(t *testing.T, pool *PoolDevice) {
252 err := pool.CreateSnapshotDevice(context.Background(), thinDevice1, snapDevice1, device1Size)

Callers 1

TestPoolDeviceFunction · 0.85

Calls 2

GetFullDevicePathFunction · 0.92
GetUsageMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…