Skip to content

Commit

Permalink
Merge pull request #1026 from dpino/check-status-code-monitor-test
Browse files Browse the repository at this point in the history
Check status code in monitor test
  • Loading branch information
dpino authored Mar 14, 2018
2 parents 3dc582f + cb68e08 commit 8caf229
Showing 1 changed file with 6 additions and 6 deletions.
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

0 comments on commit 8caf229

Please sign in to comment.