summaryrefslogtreecommitdiff
path: root/smoketest
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2022-07-19 08:32:03 +0200
committerChristian Poessinger <christian@poessinger.com>2022-07-19 08:32:03 +0200
commit0c10980c37d248c2ef454aa33b139ef7047e128a (patch)
tree316986f793b7378797cfce8027c5dd34ba0056c4 /smoketest
parent82d8494d349edd7707c3811a71ca0e9c0648204e (diff)
downloadvyos-1x-0c10980c37d248c2ef454aa33b139ef7047e128a.tar.gz
vyos-1x-0c10980c37d248c2ef454aa33b139ef7047e128a.zip
smoketest: telegraf: use generic service availability check
Diffstat (limited to 'smoketest')
-rwxr-xr-xsmoketest/scripts/cli/test_service_monitoring_telegraf.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/smoketest/scripts/cli/test_service_monitoring_telegraf.py b/smoketest/scripts/cli/test_service_monitoring_telegraf.py
index f9d875e83..1c8cc9759 100755
--- a/smoketest/scripts/cli/test_service_monitoring_telegraf.py
+++ b/smoketest/scripts/cli/test_service_monitoring_telegraf.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
#
-# Copyright (C) 2021 VyOS maintainers and contributors
+# Copyright (C) 2021-2022 VyOS maintainers and contributors
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 or later as
@@ -35,9 +35,15 @@ inputs = ['cpu', 'disk', 'mem', 'net', 'system', 'kernel', 'interrupts', 'syslog
class TestMonitoringTelegraf(VyOSUnitTestSHIM.TestCase):
def tearDown(self):
+ # Check for running process
+ self.assertTrue(process_named_running(PROCESS_NAME))
+
self.cli_delete(base_path)
self.cli_commit()
+ # Check for not longer running process
+ self.assertFalse(process_named_running(PROCESS_NAME))
+
def test_01_basic_config(self):
self.cli_set(base_path + ['influxdb', 'authentication', 'organization', org])
self.cli_set(base_path + ['influxdb', 'authentication', 'token', token])
@@ -47,9 +53,6 @@ class TestMonitoringTelegraf(VyOSUnitTestSHIM.TestCase):
# commit changes
self.cli_commit()
- # Check for running process
- self.assertTrue(process_named_running(PROCESS_NAME))
-
config = read_file(TELEGRAF_CONF)
# Check telegraf config