tox unit test failed without testresources package

Bug #1599055 reported by Henry Dong
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
networking-bgpvpn
Fix Released
High
Thomas Morin
networking-odl
Fix Released
High
Unassigned
networking-sfc
Fix Released
Undecided
Yan Songming

Bug Description

When run "tox -e py27" to do unit test, there are error messages of import as below.
Add "testresources>=0.2.4 # Apache-2.0/BSD" into test-requirements.txt to fix this issue.

stack@openstack-n3:~/networking-bgpvpn$ tox -e py27
py27 create: /home/stack/networking-bgpvpn/.tox/py27
py27 installdeps: -r/home/stack/networking-bgpvpn/requirements.txt, -r/home/stack/networking-bgpvpn/test-requirements.txt
py27 develop-inst: /home/stack/networking-bgpvpn
py27 installed: alembic==0.8.6,amqp==1.4.9,anyjson==0.3.3,appdirs==1.4.0,astroid==1.3.8,Babel==2.3.4,beautifulsoup4==4.4.1,blockdiag==1.5.3,cachetools==1.1.6,cliff==2.1.0,cmd2==0.6.8,contextlib2==0.5.3,coverage==4.1,debtcollector==1.5.0,decorator==4.0.10,discover==0.4.0,Django==1.8.13,django-appconf==1.0.2,django-babel==0.5.1,django-compressor==2.0,django-nose==1.4.4,django-openstack-auth==2.3.0,django-pyscss==2.0.2,docutils==0.12,dogpile.cache==0.6.1,enum34==1.1.6,eventlet==0.19.0,extras==1.0.0,fasteners==0.14.1,fixtures==3.0.0,flake8==2.2.4,funcparserlib==0.3.6,funcsigs==1.0.2,functools32==3.2.3.post2,futures==3.0.5,futurist==0.14.0,greenlet==0.4.10,hacking==0.10.2,-e git+https://git.openstack.org/openstack/horizon@077d38682d6a1fbeb5d70bbe062340a8fca7a731#egg=horizon,httplib2==0.9.2,iso8601==0.1.11,Jinja2==2.8,jsonpatch==1.14,jsonpointer==1.10,jsonschema==2.5.1,keystoneauth1==2.8.0,keystonemiddleware==4.5.1,kombu==3.0.35,linecache2==1.0.0,logilab-common==1.2.2,logutils==0.3.3,Mako==1.0.4,MarkupSafe==0.23,mccabe==0.2.1,mock==2.0.0,monotonic==1.1,mox3==0.16.0,msgpack-python==0.4.7,netaddr==0.7.18,netifaces==0.10.4,-e git+https://git.openstack.org/openstack/networking-bagpipe@54c5149a8d11b649bfcfc3b259376683ce9501d4#egg=networking_bagpipe,-e git+https://github.com/openstack/networking-bgpvpn.git@c93da24ec404c2233755fac4e482dc2b1e6485e4#egg=networking_bgpvpn,-e git+https://git.openstack.org/openstack/networking-odl@6810043dfe85018e7d3c616775da601169adf01a#egg=networking_odl,-e git+https://git.openstack.org/openstack/neutron@8d6c6ccc14e2a6915a73d530d03ca9d5ba26b336#egg=neutron,neutron-lib==0.2.0,nose==1.3.7,openstacksdk==0.8.6,os-client-config==1.18.0,oslo.cache==1.10.0,oslo.concurrency==3.11.0,oslo.config==3.12.0,oslo.context==2.5.0,oslo.db==4.7.0,oslo.i18n==3.7.0,oslo.log==3.11.0,oslo.messaging==5.5.0,oslo.middleware==3.14.0,oslo.policy==1.11.0,oslo.reports==1.11.0,oslo.rootwrap==4.3.0,oslo.serialization==2.10.0,oslo.service==1.12.0,oslo.utils==3.14.0,oslo.versionedobjects==1.12.0,oslosphinx==4.5.0,oslotest==2.6.0,osprofiler==1.3.0,ovs==2.5.0,Paste==2.0.3,PasteDeploy==1.5.2,pathlib==1.0.1,pbr==1.10.0,pecan==1.1.2,pep8==1.5.7,pika==0.10.0,pika-pool==0.1.3,Pillow==3.2.0,Pint==0.7.2,positional==1.1.1,prettytable==0.7.2,psutil==1.2.1,pycadf==2.3.0,pyflakes==0.8.1,Pygments==2.1.3,pyinotify==0.9.6,pylint==1.4.5,pyparsing==2.1.5,pyScss==1.3.4,python-ceilometerclient==2.4.0,python-cinderclient==1.8.0,python-dateutil==2.5.3,python-designateclient==2.1.0,python-editor==1.0.1,python-glanceclient==2.1.0,python-heatclient==1.2.0,python-keystoneclient==3.1.0,python-mimeparse==1.5.2,python-neutronclient==4.2.0,python-novaclient==4.1.0,python-openstackclient==2.6.0,python-subunit==1.2.0,python-swiftclient==3.0.0,pytz==2016.4,PyYAML==3.11,rcssmin==1.0.6,reno==1.8.0,repoze.lru==0.6,requests==2.10.0,requestsexceptions==1.1.3,retrying==1.3.3,rfc3986==0.3.1,rjsmin==1.0.12,Routes==2.3.1,ryu==4.4,seqdiag==0.9.5,simplejson==3.8.2,singledispatch==3.4.0.3,six==1.10.0,Sphinx==1.2.3,sphinxcontrib-blockdiag==1.5.5,sphinxcontrib-seqdiag==0.8.5,SQLAlchemy==1.0.13,sqlalchemy-migrate==0.10.0,sqlparse==0.1.19,stevedore==1.15.0,Tempita==0.5.2,testrepository==0.0.20,testscenarios==0.5.0,testtools==2.2.0,traceback2==1.4.0,unicodecsv==0.14.1,unittest2==1.1.0,waitress==0.9.0,warlock==1.2.0,webcolors==1.5,WebOb==1.6.1,WebTest==2.0.21,wrapt==1.10.8,XStatic==1.0.1,XStatic-Angular==1.3.18.1,XStatic-Angular-Bootstrap==0.11.0.7,XStatic-Angular-FileUpload==12.0.4.0,XStatic-Angular-Gettext==2.1.0.2,XStatic-Angular-lrdragndrop==1.0.2.2,XStatic-Bootstrap-Datepicker==1.3.1.0,XStatic-Bootstrap-SCSS==3.3.6.0,XStatic-bootswatch==3.3.6.0,XStatic-D3==3.1.6.2,XStatic-Font-Awesome==4.5.0.0,XStatic-Hogan==2.0.0.2,XStatic-Jasmine==2.4.1.1,XStatic-jQuery==1.10.2.1,XStatic-JQuery-Migrate==1.2.1.1,XStatic-jquery-ui==1.11.0.1,XStatic-JQuery.quicksearch==2.0.3.1,XStatic-JQuery.TableSorter==2.14.5.1,XStatic-JSEncrypt==2.0.0.2,XStatic-mdi==1.4.57.0,XStatic-Rickshaw==1.5.0.0,XStatic-roboto-fontface==0.4.3.2,XStatic-smart-table==1.4.5.3,XStatic-Spin==1.2.5.2,XStatic-term.js==0.0.7.0
py27 runtests: PYTHONHASHSEED='3676395783'
py27 runtests: commands[0] | python setup.py testr --slowest --testr-args=
running testr
running=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \
OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \
OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-60} \
${PYTHON:-python} -m subunit.run discover -t ./ ${OS_TEST_PATH:-./networking_bgpvpn/tests/unit} --list
--- import errors ---
Failed to import test module: networking_bgpvpn.tests.unit.client.test_client
Traceback (most recent call last):
  File "/home/stack/networking-bgpvpn/.tox/py27/local/lib/python2.7/site-packages/unittest2/loader.py", line 456, in _find_test_path
    module = self._get_module_from_name(name)
  File "/home/stack/networking-bgpvpn/.tox/py27/local/lib/python2.7/site-packages/unittest2/loader.py", line 395, in _get_module_from_name
    __import__(name)
  File "networking_bgpvpn/tests/unit/client/test_client.py", line 18, in <module>
    from neutron.tests.unit.extensions import base as test_extensions_base
  File "/home/stack/networking-bgpvpn/.tox/py27/src/neutron/neutron/tests/unit/extensions/base.py", line 30, in <module>
    from neutron.tests.unit.api import test_extensions
  File "/home/stack/networking-bgpvpn/.tox/py27/src/neutron/neutron/tests/unit/api/test_extensions.py", line 38, in <module>
    from neutron.tests.unit.api.v2 import test_base
  File "/home/stack/networking-bgpvpn/.tox/py27/src/neutron/neutron/tests/unit/api/v2/test_base.py", line 46, in <module>
    from neutron.tests.unit import testlib_api
  File "/home/stack/networking-bgpvpn/.tox/py27/src/neutron/neutron/tests/unit/testlib_api.py", line 18, in <module>
    import testresources
ImportError: No module named testresources

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

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

Changed in bgpvpn:
assignee: nobody → Henry Dong (henry-dong)
status: New → In Progress
Changed in bgpvpn:
importance: Undecided → High
Changed in networking-sfc:
assignee: nobody → Yan Songming (songmingyan)
Changed in networking-odl:
assignee: nobody → Yan Songming (songmingyan)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to networking-sfc (master)

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

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

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

Changed in networking-odl:
status: New → In Progress
Changed in bgpvpn:
assignee: Henry Dong (henry-dong) → Thomas Morin (tmmorin-orange)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to networking-bgpvpn (master)

Reviewed: https://review.openstack.org/337541
Committed: https://git.openstack.org/cgit/openstack/networking-bgpvpn/commit/?id=76e70d4181a70e032082de6c9d48c258058489ab
Submitter: Jenkins
Branch: master

commit 76e70d4181a70e032082de6c9d48c258058489ab
Author: Henry <email address hidden>
Date: Tue Jul 5 04:26:59 2016 -0400

    Fix tox unit test issue

    Add "testresources>=0.2.4" into test-requirements.txt and mock
    OVS bridge classes in bagpipe driver tests.

    Co-Authored-By: <email address hidden>
    Co-Authored-By: <email address hidden>

    Change-Id: I15daa5cf2515517850cef30b562866cf88088323
    Closes-bug: #1599055

Changed in bgpvpn:
status: In Progress → Fix Released
Revision history for this message
Federico Ressi (federico-ressi-9) wrote :

I have proposed a patch for networking-odl: https://review.openstack.org/#/c/338222/

Changed in networking-odl:
assignee: Yan Songming (songmingyan) → Federico Ressi (federico-ressi-9)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on networking-odl (master)

Change abandoned by Federico Ressi (<email address hidden>) on branch: master
Review: https://review.openstack.org/338222
Reason: This is a duplicate of https://review.openstack.org/#/c/337623

Revision history for this message
Federico Ressi (federico-ressi-9) wrote :

Sorry @Yan Songming. I assigned to me by mistake in networlking-odl. Your fix looks good to me.

Changed in networking-odl:
assignee: Federico Ressi (federico-ressi-9) → nobody
Revision history for this message
Isaku Yamahata (yamahata) wrote :

This bug is caused by
commit 546ba377db81e7ba984b63942f6bbb974a653e3c
Change-Id: Ie27cf174fa24c2f479af47335d9ae139fb7d159a

Changed in networking-odl:
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to networking-sfc (master)

Reviewed: https://review.openstack.org/337614
Committed: https://git.openstack.org/cgit/openstack/networking-sfc/commit/?id=d07ac5ee16913ee833c8e9e81b9a74cd78ee0b3e
Submitter: Jenkins
Branch: master

commit d07ac5ee16913ee833c8e9e81b9a74cd78ee0b3e
Author: SongmingYan <email address hidden>
Date: Tue Jul 5 07:00:08 2016 -0400

    Fix tox unit test issue

    Add "testresources>=0.2.4" into test-requirements.txt.
    Subclassing the test from OVSOFCtlTestBase provides a cleaner solution.

    Co-Authored-By: Ryan Moats <email address hidden>

    Change-Id: I7e6df407c7c083b4d98b631615161bcda82059a3
    Closes-bug: #1599055

Changed in networking-sfc:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to networking-bgpvpn (master)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to networking-odl (master)

Reviewed: https://review.openstack.org/337623
Committed: https://git.openstack.org/cgit/openstack/networking-odl/commit/?id=dedafa6bdb3d23dc6d7354d14744d3c6ce8b04af
Submitter: Jenkins
Branch: master

commit dedafa6bdb3d23dc6d7354d14744d3c6ce8b04af
Author: SongmingYan <email address hidden>
Date: Tue Jul 5 07:22:33 2016 -0400

    Fix tox unit test issue

    Add "testresources>=0.2.4" into test-requirements.txt.

    Change-Id: I672d98dd00590f87825322dbd2fcb81e11ca8750
    Closes-bug: #1599055

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

Reviewed: https://review.openstack.org/338745
Committed: https://git.openstack.org/cgit/openstack/networking-bgpvpn/commit/?id=cc8d47820919c09e56aaff8b5f57271d7c427e73
Submitter: Jenkins
Branch: master

commit cc8d47820919c09e56aaff8b5f57271d7c427e73
Author: Thomas Morin <email address hidden>
Date: Thu Jul 7 09:45:48 2016 +0200

    Improve bagpipe unittest involving OVS bridges

    Mimic I7e6df407c7c083b4d98b631615161bcda82059a3
    to improve what we did in I15daa5cf2515517850cef30b562866cf88088323.

    Change-Id: I5206ab0d6fe80740a83666cd7c03d0619304932a
    Closes-bug: #1599055

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/networking-sfc 2.0.0

This issue was fixed in the openstack/networking-sfc 2.0.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/networking-bgpvpn 5.0.0

This issue was fixed in the openstack/networking-bgpvpn 5.0.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to networking-odl (stable/mitaka)

Fix proposed to branch: stable/mitaka
Review: https://review.openstack.org/388510

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to networking-odl (stable/liberty)

Fix proposed to branch: stable/liberty
Review: https://review.openstack.org/388514

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/networking-odl 3.0.0

This issue was fixed in the openstack/networking-odl 3.0.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/networking-bgpvpn 5.0.0

This issue was fixed in the openstack/networking-bgpvpn 5.0.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/networking-odl 3.0.0

This issue was fixed in the openstack/networking-odl 3.0.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to networking-odl (stable/mitaka)

Reviewed: https://review.openstack.org/388510
Committed: https://git.openstack.org/cgit/openstack/networking-odl/commit/?id=32114f521b16048d3f9318ab4104759603864b28
Submitter: Jenkins
Branch: stable/mitaka

commit 32114f521b16048d3f9318ab4104759603864b28
Author: SongmingYan <email address hidden>
Date: Tue Jul 5 07:22:33 2016 -0400

    Fix tox unit test issue

    Add "testresources>=0.2.4" into test-requirements.txt.

    Change-Id: I672d98dd00590f87825322dbd2fcb81e11ca8750
    Closes-bug: #1599055
    (cherry picked from commit dedafa6bdb3d23dc6d7354d14744d3c6ce8b04af)

tags: added: in-stable-mitaka
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on networking-odl (stable/liberty)

Change abandoned by Ihar Hrachyshka (<email address hidden>) on branch: stable/liberty
Review: https://review.openstack.org/388514
Reason: It's actually not clear if it's needed anymore. The dep patch passed the gate, so apparently the gate is fixed now.

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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