Import errors of tempest plugins are not reported

Bug #1788624 reported by Stamatis Katsaounis on 2018-08-23
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tempest
Undecided
Unassigned

Bug Description

I faced the following error with tempest plugins (any plugin).

If inside a python file of a tempest plugin which contains a testcase there is an import of a package which does not exists, the testcase fails.

Furthermore, it does not only fail but also it does not get reported as a failed testcase which run.

In order to replicate one could:
1) use neutron tempest plugin (https://github.com/openstack/neutron-tempest-plugin)
2) edit https://github.com/openstack/neutron-tempest-plugin/blob/master/neutron_tempest_plugin/api/test_trunk_negative.py
3) add import numpy as np
4) run testcase neutron_tempest_plugin.api.test_trunk_negative.TrunkTestJSON.test_create_subport_nonexistent_port_id
5) get the following output
======
Totals
======
Ran: 0 tests in 4.0000 sec.
 - Passed: 0
 - Skipped: 0
 - Expected Fail: 0
 - Unexpected Success: 0
 - Failed: 0
Sum of execute time for each test: 0.0000 sec.

NOTE: This does not happen if tempest itself uses that package and the package is missing from environment (for example "import testtools"). At this case the tempest itself breaks and outputs the error in import.

Kind regards,
Stamatis

description: updated
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers