Mogan project CI error

Bug #1808900 reported by Gao Zexu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mogan
Fix Released
Undecided
Gao Zexu

Bug Description

openstack-tox-py27 check task of Mogan project failed, detail:

ft1.2: mogan.tests.unit.api.test_hooks.TestContextHook.test_context_hook_public_api_StringException: Traceback (most recent call last):
  File "/home/zuul/src/git.openstack.org/openstack/mogan/.tox/py27/local/lib/python2.7/site-packages/mock/mock.py", line 1305, in patched
    return func(*args, **keywargs)
  File "mogan/tests/unit/api/test_hooks.py", line 117, in test_context_hook_public_api
    context_hook.before(reqstate)
  File "mogan/api/hooks.py", line 89, in before
    is_admin = policy.check('is_admin', creds, creds)
  File "mogan/common/policy.py", line 344, in check
    return enforcer.enforce(rule, target, creds, *args, **kwargs)
  File "/home/zuul/src/git.openstack.org/openstack/mogan/.tox/py27/local/lib/python2.7/site-packages/oslo_policy/policy.py", line 851, in enforce
    if isinstance(creds, context.RequestContext):
TypeError: isinstance() arg 2 must be a class, type, or tuple of classes and types

ft1.3: mogan.tests.unit.api.test_hooks.TestContextHook.test_context_hook_StringException: Traceback (most recent call last):
  File "/home/zuul/src/git.openstack.org/openstack/mogan/.tox/py27/local/lib/python2.7/site-packages/mock/mock.py", line 1305, in patched
    return func(*args, **keywargs)
  File "mogan/tests/unit/api/test_hooks.py", line 99, in test_context_hook
    context_hook.before(reqstate)
  File "mogan/api/hooks.py", line 89, in before
    is_admin = policy.check('is_admin', creds, creds)
  File "mogan/common/policy.py", line 344, in check
    return enforcer.enforce(rule, target, creds, *args, **kwargs)
  File "/home/zuul/src/git.openstack.org/openstack/mogan/.tox/py27/local/lib/python2.7/site-packages/oslo_policy/policy.py", line 851, in enforce
    if isinstance(creds, context.RequestContext):
TypeError: isinstance() arg 2 must be a class, type, or tuple of classes and types

Gao Zexu (gaozx-fnst)
description: updated
Changed in mogan:
assignee: nobody → Gao Zexu (gaozx-fnst)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to mogan (master)

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

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

Reviewed: https://review.openstack.org/625772
Committed: https://git.openstack.org/cgit/openstack/mogan/commit/?id=c801a3f8eafac719f27b8444db5f035eb49ee501
Submitter: Zuul
Branch: master

commit c801a3f8eafac719f27b8444db5f035eb49ee501
Author: zxgao <email address hidden>
Date: Tue Dec 18 11:01:05 2018 +0800

    Fix context hook unit test error.

    Change-Id: I8559b62c2b485d385626253cfcca4ecda2ecaa7f
    Closes-Bug: 1808900

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