You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Address possible issue with skewed timestamps in system log after (re)boot with power loss (#9)
* Add tests for log with skewed timestamps
* fix: introduce workaround for aligning timestamps in boot log
See #5 for details.
* Extend tests, add comments
* loki_exporter: use mktemp instead of static dir
* loki_exporter: put curl into verbose mode for tests
* loki_exporter: clean up curl options
* loki_exporter: adjust curl headers once again
In particular:
1. Tests do not require authorization, so it has been turned off.
2. Added "Connection: close" header to all curl invocations to avoid
unnecessary log warnings in the interim proxies like nginx if HTTP
keepalives are enabled.
Copy file name to clipboardExpand all lines: Makefile
+23-5Lines changed: 23 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -142,6 +142,9 @@ run-test-exporter-boot: test-env ## Run exporter with mocking logread (BOOT=1)
142
142
LOKI_AUTH_HEADER="none"\
143
143
/bin/bash -u loki_exporter.sh
144
144
145
+
tests/default-timeshifted.log: tests/default.log
146
+
$(TOPDIR)/tests/create_timeshifted_log.py >$@
147
+
145
148
run-test-exporter-onetime: create-test-env ## Run one-time cycle of mocking logread + exporter (BOOT=1)
146
149
LOGREAD="./tests/logread.py"\
147
150
BOOT=1 \
@@ -153,17 +156,31 @@ run-test-exporter-onetime: create-test-env ## Run one-time cycle of mocking logr
153
156
/bin/bash -u loki_exporter.sh
154
157
touch $@
155
158
159
+
run-test-exporter-timeshifted-onetime: tests/default-timeshifted.log create-test-env ## Run one-time cycle of mocking logread + exporter (BOOT=1 with time unsync emulation)
0 commit comments