Skip to content

Commit

Permalink
ddclient: T5791: extend smoketest for running daemon in foreground
Browse files Browse the repository at this point in the history
  • Loading branch information
c-po committed Jan 6, 2025
1 parent f2e8531 commit dbf42ed
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions smoketest/scripts/cli/test_service_dns_dynamic.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
#
# Copyright (C) 2019-2024 VyOS maintainers and contributors
# Copyright (C) 2019-2025 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
Expand Down Expand Up @@ -38,9 +38,13 @@
interface = 'eth0'

class TestServiceDDNS(VyOSUnitTestSHIM.TestCase):
def setUp(self):
# Always start with a clean CLI instance
self.cli_delete(base_path)
@classmethod
def setUpClass(cls):
super(TestServiceDDNS, cls).setUpClass()

# ensure we can also run this test on a live system - so lets clean
# out the current configuration :)
cls.cli_delete(cls, base_path)

def tearDown(self):
# Check for running process
Expand Down Expand Up @@ -336,8 +340,8 @@ def test_08_dyndns_vrf(self):

# Check for process in VRF
systemd_override = cmd(f'cat {DDCLIENT_SYSTEMD_UNIT}')
self.assertIn(f'ExecStart=ip vrf exec {vrf_name} /usr/bin/ddclient -file {DDCLIENT_CONF}',
systemd_override)
self.assertIn(f'ExecStart=ip vrf exec {vrf_name} /usr/bin/ddclient ' \
f'--file {DDCLIENT_CONF} --foreground', systemd_override)

# Check for process in VRF
proc = cmd(f'ip vrf pids {vrf_name}')
Expand Down

0 comments on commit dbf42ed

Please sign in to comment.