From fa90ab06aa09224d5a1fbac69c9bc0f067099206 Mon Sep 17 00:00:00 2001 From: Micah Date: Mon, 30 Nov 2015 12:48:10 -0500 Subject: improve whitebox tests to match on more specific processes (#7655, #7676) Change-Id: I9f267ba38130ceb308d284c926b14d2cee9f87be --- tests/white-box/mx.rb | 18 +++++++++--------- tests/white-box/openvpn.rb | 6 +++--- tests/white-box/soledad.rb | 2 +- tests/white-box/webapp.rb | 4 ++-- 4 files changed, 15 insertions(+), 15 deletions(-) (limited to 'tests/white-box') diff --git a/tests/white-box/mx.rb b/tests/white-box/mx.rb index 8b5cc485..ba523fe0 100644 --- a/tests/white-box/mx.rb +++ b/tests/white-box/mx.rb @@ -32,15 +32,15 @@ class Mx < LeapTest end def test_03_Are_MX_daemons_running? - assert_running 'leap_mx' - assert_running '/usr/lib/postfix/master' - assert_running '/usr/sbin/postfwd' - assert_running 'postfwd2::cache' - assert_running 'postfwd2::policy' - assert_running '/usr/sbin/unbound' - assert_running '^/usr/sbin/clamd -c /etc/clamav/clamd.conf$' - assert_running '^/usr/sbin/clamav-milter --config-file=/etc/clamav/clamav-milter.conf$' - assert_running '^/usr/bin/freshclam -d --quiet --config-file=/etc/clamav/freshclam.conf$' + assert_running '.*/usr/bin/twistd.*leap_mx.tac' + assert_running '^/usr/lib/postfix/master$' + assert_running '^/usr/sbin/postfwd' + assert_running 'postfwd2::cache$' + assert_running 'postfwd2::policy$' + assert_running '^/usr/sbin/unbound$' + assert_running '^/usr/sbin/clamd' + assert_running '^/usr/sbin/clamav-milter' + assert_running '^/usr/bin/freshclam' pass end diff --git a/tests/white-box/openvpn.rb b/tests/white-box/openvpn.rb index 23a40426..170d4503 100644 --- a/tests/white-box/openvpn.rb +++ b/tests/white-box/openvpn.rb @@ -7,9 +7,9 @@ class OpenVPN < LeapTest end def test_01_Are_daemons_running? - assert_running '/usr/sbin/openvpn .* /etc/openvpn/tcp_config.conf' - assert_running '/usr/sbin/openvpn .* /etc/openvpn/udp_config.conf' - assert_running '/usr/sbin/unbound' + assert_running '^/usr/sbin/openvpn .* /etc/openvpn/tcp_config.conf$' + assert_running '^/usr/sbin/openvpn .* /etc/openvpn/udp_config.conf$' + assert_running '^/usr/sbin/unbound$' pass end diff --git a/tests/white-box/soledad.rb b/tests/white-box/soledad.rb index 5a13e4a6..d41bee58 100644 --- a/tests/white-box/soledad.rb +++ b/tests/white-box/soledad.rb @@ -10,7 +10,7 @@ class Soledad < LeapTest end def test_00_Is_Soledad_running? - assert_running 'soledad' + assert_running '.*/usr/bin/twistd.*--wsgi=leap.soledad.server.application' pass end diff --git a/tests/white-box/webapp.rb b/tests/white-box/webapp.rb index 4a669db3..54c00b89 100644 --- a/tests/white-box/webapp.rb +++ b/tests/white-box/webapp.rb @@ -27,8 +27,8 @@ class Webapp < LeapTest end def test_03_Are_daemons_running? - assert_running '/usr/sbin/apache2' - assert_running '/usr/bin/nickserver' + assert_running '^/usr/sbin/apache2' + assert_running '^/usr/bin/ruby /usr/bin/nickserver' pass end -- cgit v1.2.3