Functional tests fail on Xenial kernel
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Telegraf Charm |
Won't Fix
|
Low
|
Unassigned |
Bug Description
When running functional tests on Openstack instances - i.e. KVM VMS rather than LXD - I see test failures for Xenial when checking the metrics available. The zoneinfo metric is missing.
I added a patch to get more detail:
diff --git a/src/tests/
index 1197396..3433c5d 100644
--- a/src/tests/
+++ b/src/tests/
@@ -32,7 +32,8 @@ class BaseTelegrafTes
def check_re_
# findall returns a list, [] when no match
- self.assertTrue
+ self.assertTrue
+ msg="Failed to find {}".format(
def check_metrics(self, patterns):
2021-01-28 17:01:25 [INFO] =======
2021-01-28 17:01:25 [INFO] FAIL: test_01_
2021-01-28 17:01:25 [INFO] -------
2021-01-28 17:01:25 [INFO] Traceback (most recent call last):
2021-01-28 17:01:25 [INFO] File "./tests/
2021-01-28 17:01:25 [INFO] self.check_
2021-01-28 17:01:25 [INFO] File "./tests/base.py", line 70, in check_metrics
2021-01-28 17:01:25 [INFO] self.check_
2021-01-28 17:01:25 [INFO] File "./tests/base.py", line 35, in check_re_pattern
2021-01-28 17:01:25 [INFO] self.assertTrue
2021-01-28 17:01:25 [INFO] AssertionError: [] is not true : Failed to find ^zoneinfo_
2021-01-28 17:01:25 [INFO] -------
https:/
Changed in charm-telegraf: | |
importance: | Undecided → Low |
The xenial zoneinfo file appears to have a "scanned" line between "high" and "spanned" counters.
Updating the regex to have another non-greedy line-eater between those two counters should do the trick.