diff options
author | elijah <elijah@riseup.net> | 2014-11-30 22:19:20 -0800 |
---|---|---|
committer | elijah <elijah@riseup.net> | 2014-11-30 22:19:20 -0800 |
commit | 69067b64942fad72bd0ec9eeab7f161ef4a16ee3 (patch) | |
tree | 71b73fdc6d48ea887b89307aa1cd0953aaebac3f /tests | |
parent | fb02557925a464488c2996df3625c051c172f8ad (diff) |
minor: ensure there is only one tapicero process
Diffstat (limited to 'tests')
-rw-r--r-- | tests/helpers/os_helper.rb | 8 | ||||
-rw-r--r-- | tests/white-box/couchdb.rb | 2 |
2 files changed, 7 insertions, 3 deletions
diff --git a/tests/helpers/os_helper.rb b/tests/helpers/os_helper.rb index 529e899f..aad67dda 100644 --- a/tests/helpers/os_helper.rb +++ b/tests/helpers/os_helper.rb @@ -17,8 +17,12 @@ class LeapTest }.compact end - def assert_running(process) - assert pgrep(process).any?, "No running process for #{process}" + def assert_running(process, options={}) + processes = pgrep(process) + assert processes.any?, "No running process for #{process}" + if options[:single] + assert processes.length == 1, "More than one process for #{process}" + end end # diff --git a/tests/white-box/couchdb.rb b/tests/white-box/couchdb.rb index 2788f4f7..450c4201 100644 --- a/tests/white-box/couchdb.rb +++ b/tests/white-box/couchdb.rb @@ -9,7 +9,7 @@ class CouchDB < LeapTest end def test_00_Are_daemons_running? - assert_running 'tapicero' + assert_running '^tapicero', :single => true if multimaster? assert_running 'bin/beam' assert_running 'bin/epmd' |