[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Pulp-list] Database initialization question



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I'm missing something. When I run test_consumer_utils by itself (I think
this only exists in the CDS branch), all of the tests throw:

======================================================================
ERROR: Tests retrieving consumers bound to a repo when there are
actually consumers for
- ----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/jdob/code/pulp/test/unit/test_consumer_utils.py", line 44,
in setUp
    self.repo_api = RepoApi()
  File
"/home/jdob/code/pulp/test/unit/../../src/pulp/server/api/repo.py", line
72, in __init__
    self.packageapi = PackageApi()
  File
"/home/jdob/code/pulp/test/unit/../../src/pulp/server/api/package.py",
line 46, in __init__
    self.objectdb.ensure_index([('name', pymongo.DESCENDING),
  File
"/home/jdob/code/pulp/test/unit/../../src/pulp/server/api/base.py", line
27, in objectdb
    return self._getcollection()
  File
"/home/jdob/code/pulp/test/unit/../../src/pulp/server/api/package.py",
line 67, in _getcollection
    return model.Package.get_collection()
  File
"/home/jdob/code/pulp/test/unit/../../src/pulp/server/db/model/base.py",
line 127, in get_collection
    cls.__collection = cls._get_collection_from_db()
  File
"/home/jdob/code/pulp/test/unit/../../src/pulp/server/db/model/base.py",
line 98, in _get_collection_from_db
    raise RuntimeError(msg)
RuntimeError: Cannot get collection from uninitialized database



That comes at the line where I create a RepoApi, which creates a
PackageApi. In PackageApi.__init__ it's bombing when it tries to get the
Package collection.

The tests run fine when I run the whole suite, so there's some sort of
init step that's being done elsewhere that I'm not calling here. Any
idea of what that call is?


- -- 
Jay Dobies
RHCE# 805008743336126
Freenode: jdob
http://pulpproject.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJNcQDnAAoJEOMmcTqOSQHC3P4H/idU9BDddmaZSnhyR+f6W2mz
KPvjxUpvUwCATQYXI9szU9m+UsYKeTAvuVHg8VVR1zLR4BFjAdQ9sVZF+UnZqteu
aLfV9ZeAuLQOr22Z3m9vruCezI+KSYzMlLxLBLGxnceWA4TyJ7v3GuMjEbSkOrBI
D2toNfGT+TXw0d3dKRm9TdUceR3IrCXp3xWUcKJzlspR+xJzqfDjPSetJudjNBax
qmIu5Gr5+bXz88Y67JuTbYoI7PvNW8DYd7fPtUlrnwDDx6T4tSr6razA7IjaEofj
xgqo51cCrZO7P5uYaeaSROc2mXw553U93BxFmdTGb1kAGFD2BuMMuTlAmpMW+Mw=
=Vx0O
-----END PGP SIGNATURE-----


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]