This test verifies that a file is correctly followed when rotated in the manner of
logrotate
's create
directive. The subject should continue to read data sent to the
rotated file and recognize the new file in it's place. Failure to do so results in data
loss as well as duplicate data.
- Each subject is configured to tail a test log file and send it to a downstream service.
- The subject is started.
- The test log file is renamed in a way that it matches the configured patterns.
- A new empty file is created in it's place.
- A unique new line is written to both files.
- Assert that the downstream service received both new unique lines and did not receive duplicate data.
Subject | Result |
---|---|
Filebeat | ✅ |
FluentBit | ✅ |
FluentD | ✅ |
Logstash | ✅ |
Splunk HF | ✅ |
Splunk UF | ✅ |
Vector | ✅ |
You can run this test via:
test -t file_rotate_create_correctness