[nailgun] Nailgun tests fail because of the missing 'fixtures' dep

Bug #1334528 reported by Roman Bogorodskiy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Committed
Medium
Nikolay Markov

Bug Description

tox -epy27 fails with:

======================================================================
ERROR: Failure: ImportError (No module named fixtures)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/novel/fuel-web/nailgun/.tox/py27/local/lib/python2.7/site-packages/nose/loader.py", line 390, in loadTestsFromName
    addr.filename, addr.module)
  File "/home/novel/fuel-web/nailgun/.tox/py27/local/lib/python2.7/site-packages/nose/importer.py", line 39, in importFromPath
    return self.importFromDir(dir_path, fqname)
  File "/home/novel/fuel-web/nailgun/.tox/py27/local/lib/python2.7/site-packages/nose/importer.py", line 86, in importFromDir
    mod = load_module(part_fqname, fh, filename, desc)
  File "/home/novel/fuel-web/nailgun/nailgun/openstack/common/db/sqlalchemy/test_migrations.py", line 30, in <module>
    from nailgun.openstack.common import test
  File "/home/novel/fuel-web/nailgun/nailgun/openstack/common/test.py", line 22, in <module>
    import fixtures
ImportError: No module named fixtures
-------------------- >> begin captured logging << --------------------
nailgun: DEBUG: Initialize middleware: ['HTTPLoggerMiddleware', 'HTTPMethodOverrideMiddleware', 'StaticMiddleware']
--------------------- >> end captured logging << ---------------------

======================================================================
ERROR: Failure: ImportError (No module named fixtures)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/novel/fuel-web/nailgun/.tox/py27/local/lib/python2.7/site-packages/nose/loader.py", line 390, in loadTestsFromName
    addr.filename, addr.module)
  File "/home/novel/fuel-web/nailgun/.tox/py27/local/lib/python2.7/site-packages/nose/importer.py", line 39, in importFromPath
    return self.importFromDir(dir_path, fqname)
  File "/home/novel/fuel-web/nailgun/.tox/py27/local/lib/python2.7/site-packages/nose/importer.py", line 86, in importFromDir
    mod = load_module(part_fqname, fh, filename, desc)
  File "/home/novel/fuel-web/nailgun/nailgun/openstack/common/test.py", line 22, in <module>
    import fixtures
ImportError: No module named fixtures

----------------------------------------------------------------------

There doesn't seem to be the 'fixtures' dependency:

$> grep -i fixtures requirements.txt test-requirements.txt
$>

fuel-web is from today's master, 3de47c1

Tags: nailgun
tags: added: nailgun
Revision history for this message
Roman Bogorodskiy (novel) wrote :

I was able to run tests successfully with this change:

diff --git a/nailgun/test-requirements.txt b/nailgun/test-requirements.txt
index 5cb1eaa..13be100 100644
--- a/nailgun/test-requirements.txt
+++ b/nailgun/test-requirements.txt
@@ -13,3 +13,5 @@ sphinxcontrib-seqdiag==0.6.0
 sphinxcontrib-nwdiag==0.7.0
 tox==1.7.1
 webtest==2.0.14
+testtools
+fixtures

Changed in fuel:
importance: Undecided → Medium
assignee: nobody → Fuel Python Team (fuel-python)
milestone: none → 5.1
Revision history for this message
Dima Shulyak (dshulyak) wrote :

Hi, if you want to use nailgun/openstack/common/test.py please add those dependenices with you patch.

But probably you need simply inherit from nailgun/test/base.BaseTestCase

Changed in fuel:
status: New → Confirmed
Revision history for this message
Ihor Kalnytskyi (ikalnytskyi) wrote :

Tox runs nosetest for entire nailgun directory, but before tox we ran it for nailgun/test only.

So we have to decide how to fix it:

1/ Add unnecessary dependencies
2/ Run nosetest for nailgun/test.

As for me, I'd prefer to use solution no. 2

Changed in fuel:
status: Confirmed → Triaged
Revision history for this message
Roman Bogorodskiy (novel) wrote :

Dima, I was running tests on clean master, without any local changes. Though, I have other branches so probably it gets confused by some leftover *.pyc files.

Dmitry Ilyin (idv1985)
summary: - Nailgun tests fail because of the missing 'fixtures' dep
+ [nailgun] Nailgun tests fail because of the missing 'fixtures' dep
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-web (master)

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

Changed in fuel:
assignee: Fuel Python Team (fuel-python) → Nikolay Markov (nmarkov)
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-web (master)

Reviewed: https://review.openstack.org/109302
Committed: https://git.openstack.org/cgit/stackforge/fuel-web/commit/?id=926479cec4b23ec7b2e82ddb8c0c99cff3e66f04
Submitter: Jenkins
Branch: master

commit 926479cec4b23ec7b2e82ddb8c0c99cff3e66f04
Author: Nikolay Markov <email address hidden>
Date: Thu Jul 24 18:09:44 2014 +0400

    Full path in tox.ini

    Change-Id: I6eb03267068090d5be4efd7968c64c1455b75de5
    Closes-Bug: #1334528

Changed in fuel:
status: In Progress → Fix Committed
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.