Use full binary paths for neutron test_901_pause_resume (#686)

When pgrep_full=True is used, the resulting pgrep can match
more binaries than expected if the search pattern isn't specific
enough. This change makes the search patterns more specific
in order to only match the expected binaries.

Closes-Bug: #1933338
This commit is contained in:
coreycb
2022-01-13 13:26:33 -05:00
committed by GitHub
parent 139919b635
commit 04d388ca70

View File

@@ -492,14 +492,11 @@ class NeutronApiTest(NeutronCreateNetworkTest):
Pause service and check services are stopped then resume and check
they are started
"""
bionic_stein = openstack_utils.get_os_release('bionic_stein')
if openstack_utils.get_os_release() >= bionic_stein:
pgrep_full = True
else:
pgrep_full = False
with self.pause_resume(
["neutron-server", "apache2", "haproxy"],
pgrep_full=pgrep_full):
["/usr/bin/neutron-server",
"/usr/sbin/apache2",
"/usr/sbin/haproxy"],
pgrep_full=True):
logging.info("Testing pause resume")