[openstack-dev] Testing swift3
Pete Zaitcev
zaitcev at redhat.com
Thu Apr 4 16:33:23 UTC 2013
Unfortunately this is not good enough. The system under test may not be
feasible to modify ("python setup.py develop" writes symlinks to /usr).
But most of all I'm curious why this works in Swift but not in swift3.
-- Pete
P.S. The most insiduous problem here is when the system does have
swift3 installed (in case of Fedora it's about every box with Swift
packages, because the openstack-swift RPM depends of openstack-swift-
plugin-swift3 RPM). Then, the tests quietly test installed code.
On Thu, 4 Apr 2013 09:03:41 +0200
Chmouel Boudjnah <chmouel at chmouel.com> wrote:
> I guess you need to python setup.py develop before running the tests.
>
> (obv this can be improved with a sys.path.append("..") fix in __init__).
>
> Chmouel.
>
> On Thu, Apr 4, 2013 at 6:46 AM, Pete Zaitcev <zaitcev at redhat.com> wrote:
> > Quick question in case anyone knows:
> >
> > Normally I test eveything by doing something like this:
> >
> > (cd test/unit && nosetests --exe)
> >
> > But in swift3 this yields an error:
> >
> > ERROR: Failure: ImportError (No module named swift3)
> > ----------------------------------------------------------------------
> > Traceback (most recent call last):
> > File "/usr/lib/python2.7/site-packages/nose/loader.py", line 390, in loadTestsFromName
> > addr.filename, addr.module)
> > File "/usr/lib/python2.7/site-packages/nose/importer.py", line 39, in importFromPath
> > return self.importFromDir(dir_path, fqname)
> > File "/usr/lib/python2.7/site-packages/nose/importer.py", line 86, in importFromDir
> > mod = load_module(part_fqname, fh, filename, desc)
> > File "/q/zaitcev/hail/swift3-test/swift3/test/unit/test_swift3.py", line 28, in <module>
> > from swift3 import middleware as swift3
> > ImportError: No module named swift3
> >
> > The code seems not different from what we have in Swift proper.
> > What could be going on?
> >
> > -- Pete
More information about the OpenStack-dev
mailing list