File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed
functional/notification_sample_tests Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -182,6 +182,12 @@ def fake_logging_setup(*args):
182
182
self .useFixture (
183
183
fixtures .MonkeyPatch ('oslo_log.log.setup' , fake_logging_setup ))
184
184
185
+ def delete_stored_logs (self ):
186
+ # NOTE(gibi): this depends on the internals of the fixtures.FakeLogger.
187
+ # This could be enhanced once the PR
188
+ # https://github.com/testing-cabal/fixtures/pull/42 merges
189
+ self .logger ._output .truncate (0 )
190
+
185
191
186
192
class OutputStreamCapture (fixtures .Fixture ):
187
193
"""Capture output streams during tests.
Original file line number Diff line number Diff line change @@ -407,6 +407,11 @@ def test_instance_action(self):
407
407
# Ensure that instance is in active state after an action
408
408
self ._wait_for_state_change (self .admin_api , server , 'ACTIVE' )
409
409
410
+ # if the test step did not raised then we consider the step as
411
+ # succeeded. We drop the logs to avoid causing subunit parser
412
+ # errors due to logging too much at the end of the test case.
413
+ self .stdlog .delete_stored_logs ()
414
+
410
415
def test_create_delete_server (self ):
411
416
fake_trusted_certs = ['cert-id-1' , 'cert-id-2' ]
412
417
server = self ._boot_a_server (
You can’t perform that action at this time.
0 commit comments