Prober: no claims under PROBE_MIN_FREE_GB free on the NVMe
At ~200 articles/s what the prober stores (inspections, par2 file lists, the WAL) took ~0.8-1.1 GB an hour of homelab's root, and nothing stopped it at the 10 GB floor. Below 12 GB free it claims nothing (resumed 1 GB above): the lanes go dry and its share shrinks to its minimum. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
de7c758206
commit
9fb36d217c
6 files changed
+73
No files matched your search
@@ -0,0 +1,22 @@
|
||||
import { test } from '@japa/runner'
|
||||
import { DiskSpace } from '#services/disk_space'
|
||||
|
||||
test.group('DiskSpace', () => {
|
||||
test('short below the floor, fine again a margin above it; off without a floor', async ({ assert }) => {
|
||||
let gb = 15
|
||||
const space = new DiskSpace('probing', '/', 12, async () => gb * 1e9, 0)
|
||||
assert.isFalse(await space.short())
|
||||
gb = 11.5
|
||||
assert.isTrue(await space.short())
|
||||
// Back over the floor, not yet over the margin: still short.
|
||||
gb = 12.5
|
||||
assert.isTrue(await space.short())
|
||||
gb = 13.1
|
||||
assert.isFalse(await space.short())
|
||||
assert.isFalse(await new DiskSpace('probing', '/', 0, async () => 0, 0).short())
|
||||
})
|
||||
|
||||
test('measures a real filesystem', async ({ assert }) => {
|
||||
assert.isFalse(await new DiskSpace('probing', '/', 0.001).short())
|
||||
})
|
||||
})
|
||||
Reference in new issue
Block a user