diff options
| author | Christian Breunig <christian@breunig.cc> | 2026-09-16 23:50:12 +0200 |
|---|---|---|
| committer | Christian Breunig <christian@breunig.cc> | 2026-09-16 23:50:12 +0200 |
| commit | 9d9f3bf5aa29a7bdd7dd1abfa879eab1647b751a (patch) | |
| tree | 035458f76181d98072f735b9c7c471ff8a19b6cf /smoketest/scripts/cli/test_service_https.py | |
| parent | f6102c545e8587acb747af3dca5633143a59c781 (diff) | |
| download | vyos-1x-9d9f3bf5aa29a7bdd7dd1abfa879eab1647b751a.tar.gz vyos-1x-9d9f3bf5aa29a7bdd7dd1abfa879eab1647b751a.zip | |
smoketest: T9316: use get_vrf_pids() for the remaining VRF process probes
The other smoketests checking that a service runs inside a VRF matched the
process name against the raw output of "ip vrf pids <name>", where it can
also hit the PID column. Use get_vrf_pids() and match the name column
exactly - it is the kernel comm (ip/ipvrf.c prints the "Name:" field of
/proc/<pid>/status), so it is always a bare short name.
Diffstat (limited to 'smoketest/scripts/cli/test_service_https.py')
| -rwxr-xr-x | smoketest/scripts/cli/test_service_https.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/smoketest/scripts/cli/test_service_https.py b/smoketest/scripts/cli/test_service_https.py index 0f4330153..93a4dff3d 100755 --- a/smoketest/scripts/cli/test_service_https.py +++ b/smoketest/scripts/cli/test_service_https.py @@ -28,8 +28,8 @@ from base_vyostest_shim import ignore_warning from vyos.utils.file import read_file from vyos.utils.file import write_file from vyos.utils.process import call -from vyos.utils.process import cmdl from vyos.utils.process import process_named_running +from vyos.utils.network import get_vrf_pids from vyos.pki import CERT_BEGIN from vyos.pki import encode_certificate from vyos.pki import load_certificate @@ -248,8 +248,8 @@ class TestHTTPSService(VyOSUnitTestSHIM.TestCase): self.cli_commit() # Verify nginx is running inside the VRF - tmp = cmdl(['ip', 'vrf', 'pids', vrf]) - self.assertIn(PROCESS_NAME, tmp) + vrf_procs = [name for _, name in get_vrf_pids(vrf)] + self.assertIn(PROCESS_NAME, vrf_procs) self.cli_delete(['interfaces', 'dummy', interface]) self.cli_delete(['vrf', 'name', vrf]) |
