Dan Kenigsberg has submitted this change and it was merged.

Change subject: tests: Hide errors when testing noisy code
......................................................................


tests: Hide errors when testing noisy code

configurator.remove_config try to remove all configurations even if some
configurators fail, so it writes errors to stderr and continue. This
behavior makes sense, but breaks tests progress display:

    test_remove_config                                          can't remove 
configuration of module a
Traceback (most recent call last):
  File "/home/nsoffer/src/vdsm/lib/vdsm/tool/configurator.py", line 236, in 
remove_config
    _removeConf(c)
  File "/home/nsoffer/src/vdsm/lib/vdsm/tool/configurator.py", line 120, in 
_removeConf
    getattr(module, 'removeConf', lambda: None)()
  File "/home/nsoffer/src/vdsm/tests/toolTests.py", line 75, in removeConf
    raise Exception('mock invalid remove conf')
Exception: mock invalid remove conf
OK

Now we redirect stderr to stdout during this test, so the output is more
pleasing:

    test_remove_config                                          OK

Change-Id: I4d1bb16e0aabc9f4e2bb0ca88bc7ce4cd189e24d
Signed-off-by: Nir Soffer <[email protected]>
Reviewed-on: https://gerrit.ovirt.org/41365
Continuous-Integration: Jenkins CI
Reviewed-by: Yaniv Bronhaim <[email protected]>
Reviewed-by: mooli tayer <[email protected]>
Reviewed-by: Dan Kenigsberg <[email protected]>
---
M tests/toolTests.py
1 file changed, 3 insertions(+), 0 deletions(-)

Approvals:
  Nir Soffer: Verified
  Yaniv Bronhaim: Looks good to me, but someone else must approve
  Jenkins CI: Passed CI tests
  mooli tayer: Looks good to me, but someone else must approve
  Dan Kenigsberg: Looks good to me, approved



-- 
To view, visit https://gerrit.ovirt.org/41365
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I4d1bb16e0aabc9f4e2bb0ca88bc7ce4cd189e24d
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <[email protected]>
Gerrit-Reviewer: Yaniv Bronhaim <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-Reviewer: mooli tayer <[email protected]>
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to