Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check status code in monitor test #1026

Merged
merged 1 commit into from
Mar 14, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/program/lwaftr/tests/subcommands/monitor_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"""

from random import randint
from subprocess import call, check_call
from subprocess import call, check_call, PIPE, Popen
import unittest

from test_env import DATA_DIR, SNABB_CMD, BaseTestCase, nic_names
Expand Down Expand Up @@ -46,11 +46,11 @@ def setUpClass(cls):
raise

def test_monitor(self):
output = self.run_cmd(self.monitor_args)
self.assertIn(b'Mirror address set', output,
b'\n'.join((b'OUTPUT', output)))
self.assertIn(b'255.255.255.255', output,
b'\n'.join((b'OUTPUT', output)))
proc = Popen(self.monitor_args, stdout=PIPE, stderr=PIPE)
proc.wait()
proc.stdout.close()
proc.stderr.close()
assert(proc.returncode == 0)

@classmethod
def tearDownClass(cls):
Expand Down