Adding missing tests for regex and black-regex in tempest run
This patch will add the missing test cases for regex parameter and black-regex parameter in tempest run command. These tests will helps in coverage of tempest run CLI. Change-Id: I860689178ddaf927fdfb2921561e6c124bc0da49 Partially-Implements: blueprint tempest-cli-unit-test-coverage
This commit is contained in:
parent
62dd36b1bb
commit
71c8237711
|
@ -108,6 +108,27 @@ class TestRunReturnCode(base.TestCase):
|
|||
subprocess.call(['stestr', 'init'])
|
||||
self.assertRunExit(['tempest', 'run', '--regex', 'passing'], 0)
|
||||
|
||||
def test_tempest_run_failing(self):
|
||||
self.assertRunExit(['tempest', 'run', '--regex', 'failing'], 1)
|
||||
|
||||
def test_tempest_run_failing_with_stestr_repository(self):
|
||||
subprocess.call(['stestr', 'init'])
|
||||
self.assertRunExit(['tempest', 'run', '--regex', 'failing'], 1)
|
||||
|
||||
def test_tempest_run_blackregex_failing(self):
|
||||
self.assertRunExit(['tempest', 'run', '--black-regex', 'failing'], 0)
|
||||
|
||||
def test_tempest_run_blackregex_failing_with_stestr_repository(self):
|
||||
subprocess.call(['stestr', 'init'])
|
||||
self.assertRunExit(['tempest', 'run', '--black-regex', 'failing'], 0)
|
||||
|
||||
def test_tempest_run_blackregex_passing(self):
|
||||
self.assertRunExit(['tempest', 'run', '--black-regex', 'passing'], 1)
|
||||
|
||||
def test_tempest_run_blackregex_passing_with_stestr_repository(self):
|
||||
subprocess.call(['stestr', 'init'])
|
||||
self.assertRunExit(['tempest', 'run', '--black-regex', 'passing'], 1)
|
||||
|
||||
def test_tempest_run_fails(self):
|
||||
self.assertRunExit(['tempest', 'run'], 1)
|
||||
|
||||
|
|
Loading…
Reference in New Issue