What to test
PR #25 added --log-max-size, --log-max-files, --log-max-total flags wired to internal/rlog. The in-memory ring is separate from the on-disk file. We want to confirm that when the active daemon.log crosses the size cap, it's gzipped, rotated archives named daemon.log-<timestamp>.gz appear, retention trims the oldest.
Known constraint
--log-max-size is expressed in MiB and the minimum is 1 (1 MiB). That's higher than ideal for forcing a rotation quickly but it's the floor today. This test is already running on desk — subsequent tests in this epic (crash loops, shift, scale) will drive the log volume up faster and accelerate rotation.
Test plan
marvel daemon --mrvl --log-max-size=1 --log-max-files=3 --log-max-total=10
- Let the other tests in this epic generate log volume.
- Monitor
ls -la ~/.marvel/log/ periodically.
- Once
daemon.log nears 1 MiB, watch for rotation.
Pass
- A
daemon.log-<timestamp>.gz archive appears when the active file crosses 1 MiB.
- Active
daemon.log truncates back to well under 1 MiB after rotation.
--log-max-files=3 — at most 3 gzipped archives + 1 active. Older archives deleted.
--log-max-total=10 — total disk usage of log dir never exceeds 10 MiB.
gunzip of each archive produces readable log content with no truncation at boundaries.
Fail
- File grows unbounded past cap.
- More than
--log-max-files archives accumulate.
- Disk usage exceeds
--log-max-total.
- Corrupted gzip or truncated lines in archives.
Related: PR #25.
What to test
PR #25 added
--log-max-size,--log-max-files,--log-max-totalflags wired tointernal/rlog. The in-memory ring is separate from the on-disk file. We want to confirm that when the activedaemon.logcrosses the size cap, it's gzipped, rotated archives nameddaemon.log-<timestamp>.gzappear, retention trims the oldest.Known constraint
--log-max-sizeis expressed in MiB and the minimum is 1 (1 MiB). That's higher than ideal for forcing a rotation quickly but it's the floor today. This test is already running on desk — subsequent tests in this epic (crash loops, shift, scale) will drive the log volume up faster and accelerate rotation.Test plan
marvel daemon --mrvl --log-max-size=1 --log-max-files=3 --log-max-total=10ls -la ~/.marvel/log/periodically.daemon.lognears 1 MiB, watch for rotation.Pass
daemon.log-<timestamp>.gzarchive appears when the active file crosses 1 MiB.daemon.logtruncates back to well under 1 MiB after rotation.--log-max-files=3— at most 3 gzipped archives + 1 active. Older archives deleted.--log-max-total=10— total disk usage of log dir never exceeds 10 MiB.gunzipof each archive produces readable log content with no truncation at boundaries.Fail
--log-max-filesarchives accumulate.--log-max-total.Related: PR #25.