From 0c10980c37d248c2ef454aa33b139ef7047e128a Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Tue, 19 Jul 2022 08:32:03 +0200 Subject: smoketest: telegraf: use generic service availability check --- smoketest/scripts/cli/test_service_monitoring_telegraf.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'smoketest') 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 -- cgit v1.2.3