Unit tests are failed by TypeError

Bug #1677138 reported by Rikimaru Honjo
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
masakari
Fix Released
Undecided
Rikimaru Honjo

Bug Description

Unit tests were failed by TypeError when I ran "tox -epy27".

[Error]
--- import errors ---
Failed to import test module: masakari.api.openstack
Traceback (most recent call last):
  File "/home/jenkins/workspace/gate-masakari-python27-ubuntu-xenial/.tox/py27/local/lib/python2.7/site-packages/unittest2/loader.py", line 490, in _find_test_path
    package = self._get_module_from_name(name)
  File "/home/jenkins/workspace/gate-masakari-python27-ubuntu-xenial/.tox/py27/local/lib/python2.7/site-packages/unittest2/loader.py", line 395, in _get_module_from_name
    __import__(name)
  File "masakari/api/openstack/__init__.py", line 26, in <module>
    from masakari.api.openstack import wsgi
  File "masakari/api/openstack/wsgi.py", line 27, in <module>
    from masakari.api import api_version_request as api_version
  File "masakari/api/api_version_request.py", line 17, in <module>
    from masakari import exception
  File "masakari/exception.py", line 35, in <module>
    import masakari.conf
  File "masakari/conf/__init__.py", line 35, in <module>
    database.register_opts(CONF)
  File "masakari/conf/database.py", line 26, in register_opts
    sqlite_db='masakari.sqlite')
TypeError: set_defaults() got an unexpected keyword argument 'sqlite_db'

Failed to import test module: masakari.api.validation
Traceback (most recent call last):
  File "/home/jenkins/workspace/gate-masakari-python27-ubuntu-xenial/.tox/py27/local/lib/python2.7/site-packages/unittest2/loader.py", line 490, in _find_test_path
[...]

masakari master:

commit adf6c5504bc2e3a1b7f44621a9aafc08cf5f2060
Merge: 6ad7c90 b715305
Author: Jenkins <email address hidden>
Date: Tue Mar 28 01:50:19 2017 +0000

    Merge "Fix test method which has incorrect reference"

Please refer PY2.7 failures on gate:
http://logs.openstack.org/01/444801/4/check/gate-masakari-python27-ubuntu-xenial/e23b71b/console.html

Changed in masakari:
assignee: nobody → Rikimaru Honjo (honjo-rikimaru-c6)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on masakari (master)

Change abandoned by Rikimaru Honjo (<email address hidden>) on branch: master
Review: https://review.openstack.org/451182
Reason: I'll re-push patch because this push isn't apply for launchpad.

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

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

description: updated
summary: - Unit tests are failed by import error
+ Unit tests are failed by TypeError
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to masakari (master)

Reviewed: https://review.openstack.org/451220
Committed: https://git.openstack.org/cgit/openstack/masakari/commit/?id=e810b86020a03db182d397a52472d82cbfef02a4
Submitter: Jenkins
Branch: master

commit e810b86020a03db182d397a52472d82cbfef02a4
Author: Rikimaru Honjo <email address hidden>
Date: Wed Mar 29 13:57:43 2017 +0900

    Don't pass argument sqlite_db in set_defaults()

    Config option sqlite_db was removed from oslo.db[1].
    And that isn't used in Masakari.
    So we shouldn't set its default value.

    Remarks:
    Unit tests will be failed if this argument is passed in the latest
    oslo.db.

    [1]https://github.com/openstack/oslo.db/commit/cc64f7010522e812a696159009a72e59e2b017a8

    Change-Id: I9ae18b905eddb5441b96e0209efc35a98cfbaa4c
    Closes-Bug: #1677138

Changed in masakari:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to masakari (stable/ocata)

Fix proposed to branch: stable/ocata
Review: https://review.openstack.org/451684

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on masakari (stable/ocata)

Change abandoned by Rikimaru Honjo (<email address hidden>) on branch: stable/ocata
Review: https://review.openstack.org/451684

Revision history for this message
sainusahib (sainusahib-gmail) wrote :

Same issue :( ..

"set_defaults() got an unexpected keyword argument 'sqlite_db'"

fixed by installing latest openstack nova/nova/conf/database.py file

https://raw.githubusercontent.com/openstack/nova/390c7e420f3880a352c3934b9331774f7afdadcc/nova/conf/database.py

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.