Unit tests require /etc/melange/melange.conf file to run

Bug #990130 reported by Johannes Erdfelt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Melange
Undecided
Unassigned

Bug Description

======================================================================
ERROR: <nose.suite.ContextSuite context=melange.tests.unit>
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/johannes/virtualenvs/melange/lib/python2.6/site-packages/nose/suite.py", line 208, in run
    self.setUp()
  File "/home/johannes/virtualenvs/melange/lib/python2.6/site-packages/nose/suite.py", line 291, in setUp
    self.setupContext(ancestor)
  File "/home/johannes/virtualenvs/melange/lib/python2.6/site-packages/nose/suite.py", line 314, in setupContext
    try_run(context, names)
  File "/home/johannes/virtualenvs/melange/lib/python2.6/site-packages/nose/util.py", line 478, in try_run
    return func()
  File "/home/johannes/openstack/melange/trunk/melange/tests/unit/__init__.py", line 78, in setup
    db_api.db_reset(conf, db_based_ip_generator, db_based_mac_generator)
  File "/home/johannes/openstack/melange/trunk/melange/db/sqlalchemy/api.py", line 262, in db_reset
    db_sync(options)
  File "/home/johannes/openstack/melange/trunk/melange/db/sqlalchemy/api.py", line 249, in db_sync
    migration.db_sync(options, version, repo_path)
  File "/home/johannes/openstack/melange/trunk/melange/db/sqlalchemy/migration.py", line 124, in db_sync
    upgrade(options, version=version, repo_path=repo_path)
  File "/home/johannes/openstack/melange/trunk/melange/db/sqlalchemy/migration.py", line 66, in upgrade
    return versioning_api.upgrade(sql_connection, repo_path, version)
  File "/home/johannes/virtualenvs/melange/lib/python2.6/site-packages/migrate/versioning/api.py", line 186, in upgrade
    return _migrate(url, repository, version, upgrade=True, err=err, **opts)
  File "<string>", line 2, in _migrate
  File "/home/johannes/virtualenvs/melange/lib/python2.6/site-packages/migrate/versioning/util/__init__.py", line 159, in with_engine
    return f(*a, **kw)
  File "/home/johannes/virtualenvs/melange/lib/python2.6/site-packages/migrate/versioning/api.py", line 366, in _migrate
    schema.runchange(ver, change, changeset.step)
  File "/home/johannes/virtualenvs/melange/lib/python2.6/site-packages/migrate/versioning/schema.py", line 91, in runchange
    change.run(self.engine, step)
  File "/home/johannes/virtualenvs/melange/lib/python2.6/site-packages/migrate/versioning/script/py.py", line 145, in run
    script_func(engine)
  File "/home/johannes/openstack/melange/trunk/melange/db/sqlalchemy/migrate_repo/versions/002_device_id_to_uuid.py", line 29, in upgrade
    _db_connect()
  File "/home/johannes/openstack/melange/trunk/melange/db/sqlalchemy/migrate_repo/versions/002_device_id_to_uuid.py", line 62, in _db_connect
    conf, app = config.Config.load_paste_app('melange', options, args)
  File "/home/johannes/openstack/melange/trunk/melange/common/config.py", line 37, in load_paste_app
    conf, app = openstack_config.load_paste_app(*args, **kwargs)
  File "/home/johannes/openstack/melange/trunk/melange/openstack/common/config.py", line 283, in load_paste_app
    args, config_dir)
  File "/home/johannes/openstack/melange/trunk/melange/openstack/common/config.py", line 252, in load_paste_config
    "Cannot load application %s" % app_name)
RuntimeError: Unable to locate any configuration file. Cannot load application melange

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

Other bug subscribers