(t *testing.T, pool *PoolDevice)
| 233 | } |
| 234 | |
| 235 | func 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 | |
| 251 | func testCreateSnapshot(t *testing.T, pool *PoolDevice) { |
| 252 | err := pool.CreateSnapshotDevice(context.Background(), thinDevice1, snapDevice1, device1Size) |
no test coverage detected
searching dependent graphs…