diff options
| author | Nataliia Solomko <natalirs1985@gmail.com> | 2026-08-28 17:47:50 +0300 |
|---|---|---|
| committer | Nataliia Solomko <natalirs1985@gmail.com> | 2026-08-28 17:47:50 +0300 |
| commit | cd91ec25e3adbe2ab2f22744e18b0e3d6497efcf (patch) | |
| tree | 52527da438fc495ea30046cb7f19acda191eef37 | |
| parent | 90b7de7e084f86450d5ac42b005901972f362999 (diff) | |
| download | vyos-1x-cd91ec25e3adbe2ab2f22744e18b0e3d6497efcf.tar.gz vyos-1x-cd91ec25e3adbe2ab2f22744e18b0e3d6497efcf.zip | |
T9258: Improve blackbox-exporter ICMP smoketest for VRF binding
| -rwxr-xr-x | smoketest/scripts/cli/test_service_monitoring_prometheus.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/smoketest/scripts/cli/test_service_monitoring_prometheus.py b/smoketest/scripts/cli/test_service_monitoring_prometheus.py index cfd8d05a6..7adc7eed3 100755 --- a/smoketest/scripts/cli/test_service_monitoring_prometheus.py +++ b/smoketest/scripts/cli/test_service_monitoring_prometheus.py @@ -228,6 +228,8 @@ class TestMonitoringPrometheus(VyOSUnitTestSHIM.TestCase): # VRF + ICMP should use setpriv with net_raw capabilities self.cli_set(['vrf', 'name', vrf_name, 'table', '1111']) + # Move the listen interface into the VRF so the exporter can bind + self.cli_set(['interfaces', 'dummy', listen_if, 'vrf', vrf_name]) self.cli_set(be_path + ['vrf', vrf_name]) self.cli_set( be_path @@ -242,7 +244,11 @@ class TestMonitoringPrometheus(VyOSUnitTestSHIM.TestCase): self.assertIn('--inh-caps=+net_raw', file_content) self.assertNotIn('AmbientCapabilities=CAP_NET_RAW', file_content) + # Ensure the exporter actually started under setpriv in the VRF + self.assertTrue(process_named_running(BLACKBOX_EXPORTER_PROCESS_NAME)) + # Cleanup VRF + self.cli_delete(['interfaces', 'dummy', listen_if, 'vrf']) self.cli_delete(['vrf', 'name', vrf_name]) |
