New keystoneclient properties break testsuite

Bug #1196823 reported by Sascha Peilicke on 2013-07-02
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
High
Sascha Peilicke
Folsom
High
Julie Pichon
Grizzly
High
Julie Pichon

Bug Description

keystoneclient.Client recently changed tenant_id and tenant_name to properties which mox is unable to mock automatically. Thus we have to manually fake them in the testsuite as we did before:

======================================================================
FAIL: test_get_default_role
(openstack_dashboard.test.api_tests.keystone_tests.RoleAPITests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/var/lib/openstack-dashboard-test/openstack_dashboard/test/api_tests/keystone_tests.py", line 78, in test_get_default_role
keystoneclient = self.stub_keystoneclient()
File "/var/lib/openstack-dashboard-test/openstack_dashboard/test/helpers.py", line 289, in stub_keystoneclient
self.keystoneclient = self.mox.CreateMock(keystone_client.Client)
File "/usr/lib/python2.7/site-packages/mox.py", line 258, in CreateMock
new_mock = MockObject(class_to_mock, attrs=attrs)
File "/usr/lib/python2.7/site-packages/mox.py", line 556, in __init__
attr = getattr(class_to_mock, method)
File "/usr/lib/python2.7/site-packages/mox.py", line 608, in __getattr__
raise UnknownMethodCallError(name)
UnknownMethodCallError: Method called is not a member of the object: Method called is not a member of the object: tenant_id
>> raise UnknownMethodCallError('tenant_id')

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

Changed in horizon:
assignee: nobody → Sascha Peilicke (saschpe)
status: New → In Progress
David Lyle (david-lyle) on 2013-07-02
Changed in horizon:
importance: Undecided → High

Reviewed: https://review.openstack.org/35142
Committed: http://github.com/openstack/horizon/commit/2a6d669443b817ced3a98f5bc60a066298b6e40e
Submitter: Jenkins
Branch: master

commit 2a6d669443b817ced3a98f5bc60a066298b6e40e
Author: Sascha Peilicke <email address hidden>
Date: Mon Jul 1 16:44:14 2013 +0200

    Mock some more keystoneclient.Client properties for mox

    Fixes LP bug 1196823

    Change-Id: I9b0c56eda95ee83cf56a28f2f1b7316ad2592fa2

Changed in horizon:
status: In Progress → Fix Committed

Reviewed: https://review.openstack.org/35309
Committed: http://github.com/openstack/horizon/commit/47ea6801e96e3cb85c30420006e8d47e8d636f5b
Submitter: Jenkins
Branch: stable/grizzly

commit 47ea6801e96e3cb85c30420006e8d47e8d636f5b
Author: Sascha Peilicke <email address hidden>
Date: Mon Jun 17 15:28:48 2013 +0200

    Manually mock service_catalog in stub_keystoneclient

    MockObject.__init__ ignores properties, fixes:

    FAIL: test_get_default_role (openstack_dashboard.test.api_tests.keystone_tests.RoleAPITests)
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "/var/lib/openstack-dashboard-test/openstack_dashboard/test/api_tests/keystone_tests.py", line 78, in test_get_default_role
        keystoneclient = self.stub_keystoneclient()
      File "/var/lib/openstack-dashboard-test/openstack_dashboard/test/helpers.py", line 287, in stub_keystoneclient
        self.keystoneclient = self.mox.CreateMock(keystone_client.Client)
      File "/usr/lib64/python2.6/site-packages/mox.py", line 258, in CreateMock
        new_mock = MockObject(class_to_mock, attrs=attrs)
      File "/usr/lib64/python2.6/site-packages/mox.py", line 556, in __init__
        attr = getattr(class_to_mock, method)
      File "/usr/lib64/python2.6/site-packages/mox.py", line 608, in __getattr__
        raise UnknownMethodCallError(name)
    UnknownMethodCallError: Method called is not a member of the object: service_catalog
    >> raise UnknownMethodCallError('service_catalog')

    (cherry picked from commit 82bdecb117877bc0bd1bbd553fbd40d04cbe9078)

    Temporary change the django_openstack_auth requirement

    The new django_openstack_auth version causes gate job issues like:
    http://logs.openstack.org/33618/5/gate/gate-tempest-devstack-vm-full/29950/console.html

    Temporary disabling the 1.1.0 version.

    (from commit 2ffe032dbf21757bd574dedffa3cd3f6927bbfe3)

    Mock some more keystoneclient.Client properties for mox

    Fixes LP bug 1196823

    Change-Id: I9b0c56eda95ee83cf56a28f2f1b7316ad2592fa2
    (cherry picked from commit 2a6d669443b817ced3a98f5bc60a066298b6e40e)

David Lyle (david-lyle) on 2013-07-12
Changed in horizon:
milestone: none → havana-2
Thierry Carrez (ttx) on 2013-07-17
Changed in horizon:
status: Fix Committed → Fix Released

Reviewed: https://review.openstack.org/36664
Committed: http://github.com/openstack/horizon/commit/715d1fefff01efbc2e9725ad2d351daefe9acc4e
Submitter: Jenkins
Branch: stable/folsom

commit 715d1fefff01efbc2e9725ad2d351daefe9acc4e
Author: Sascha Peilicke <email address hidden>
Date: Mon Jun 17 15:28:48 2013 +0200

    Manually mock service_catalog in stub_keystoneclient

    MockObject.__init__ ignores properties, fixes:

    FAIL: test_get_default_role (openstack_dashboard.test.api_tests.keystone_tests.RoleAPITests)
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "/var/lib/openstack-dashboard-test/openstack_dashboard/test/api_tests/keystone_tests.py", line 78, in test_get_default_role
        keystoneclient = self.stub_keystoneclient()
      File "/var/lib/openstack-dashboard-test/openstack_dashboard/test/helpers.py", line 287, in stub_keystoneclient
        self.keystoneclient = self.mox.CreateMock(keystone_client.Client)
      File "/usr/lib64/python2.6/site-packages/mox.py", line 258, in CreateMock
        new_mock = MockObject(class_to_mock, attrs=attrs)
      File "/usr/lib64/python2.6/site-packages/mox.py", line 556, in __init__
        attr = getattr(class_to_mock, method)
      File "/usr/lib64/python2.6/site-packages/mox.py", line 608, in __getattr__
        raise UnknownMethodCallError(name)
    UnknownMethodCallError: Method called is not a member of the object: service_catalog
    >> raise UnknownMethodCallError('service_catalog')

    (cherry picked from commit 82bdecb117877bc0bd1bbd553fbd40d04cbe9078)

    Temporary change the django_openstack_auth requirement

    The new django_openstack_auth version causes gate job issues like:
    http://logs.openstack.org/33618/5/gate/gate-tempest-devstack-vm-full/29950/console.html

    Temporary disabling the 1.1.0 version.

    (from commit 2ffe032dbf21757bd574dedffa3cd3f6927bbfe3)

    Mock some more keystoneclient.Client properties for mox

    Fixes LP bug 1196823

    (cherry picked from commit 2a6d669443b817ced3a98f5bc60a066298b6e40e)

    Sync pytz from requirements.txt

    pip 1.4 is imminent, and doesn't install pre-release versions if you
    don't ask for them - this includes the date-based version of pytz.

    Grizzly: cherry-picked from commits 82bdecb117, 2ffe032dbf, 2a6d669443, 5abe67709c
    Folsom: cherry-picked from commits 47ea6801e9, a1b23d62cd31

    Conflicts:
     tools/pip-requires

    Change-Id: I9b0c56eda95ee83cf56a28f2f1b7316ad2592fa2

tags: added: in-stable-folsom
Alan Pevec (apevec) on 2013-08-01
tags: removed: in-stable-folsom
Thierry Carrez (ttx) on 2013-10-17
Changed in horizon:
milestone: havana-2 → 2013.2
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers