HTML output generation may break horizon plugin unittests

Bug #1697731 reported by Akihiro Motoki
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
High
Akihiro Motoki

Bug Description

After merging a patch which generates HTML output report for unit tests [1], trove-dashboard unit test starts to fail.
Most horizon plugins import openstack_dashboard.test.settings and they do not have nosehtmloutput in their test-requirements.txt necessarily.

openstack_dashboard.test.settings should consider this case.

The check for htmloutput module availability looks required.

[1] https://review.openstack.org/#/c/462407/

Revision history for this message
Akihiro Motoki (amotoki) wrote :

ubuntu@sheep6:/opt/stack/trove-dashboard $ tox -e py27

[....]

py27 runtests: commands[0] | /bin/bash run_tests.sh -N --no-pep8
('removing ', '/opt/stack/trove-dashboard/.tox/py27/src/horizon/openstack_dashboard/enabled/__init__.pyc')
Running trove_dashboard application tests
nosetests trove_dashboard --nocapture --nologcapture --cover-package=openstack_dashboard --cover-inclusive --all-modules --with-html-output --html-out-file=ut_openstack_dashboard_nose_results.html --verbosity=1
Usage: manage.py [options]

manage.py: error: no such option: --with-html-output
Tests failed.
ERROR: InvocationError: '/bin/bash run_tests.sh -N --no-pep8'

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

Fix proposed to branch: master
Review: https://review.openstack.org/473909

Changed in horizon:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/473909
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=4ab2877d1f583203a4e313dddf1a9bfd391ad4c1
Submitter: Jenkins
Branch: master

commit 4ab2877d1f583203a4e313dddf1a9bfd391ad4c1
Author: Akihiro Motoki <email address hidden>
Date: Tue Jun 13 16:31:41 2017 +0000

    HTML test report only when nosehtmloutput is installed

    Most horizon plugins import openstack_dashboard.test.settings
    in their test settings, but they do not necessarily have nosehtmloutput
    in test-reqs. Assuming nosehtmloutput potentially breaks plugins tests,
    we check the availability of htmloutput module (from nosehtmloutput)
    and specify --with-html-output option if available.

    Change-Id: I62502d28c75f823c47edb9de83932363cc2be99f
    Closes-Bug: #1697731

Changed in horizon:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/horizon 12.0.0.0b3

This issue was fixed in the openstack/horizon 12.0.0.0b3 development milestone.

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.