Heat tests for Swift resources don't work

Bug #1455775 reported by Yaroslav Lobankov
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
tempest
Fix Released
Undecided
Yaroslav Lobankov

Bug Description

I have encountered it recently. I just ran Heat tests for Swift resources and saw the following exception:

tempest.exceptions.StackBuildErrorException: Stack 3ca6a663-8211-4cb1-84df-a6299058ad57 is in CREATE_FAILED status due to 'Resource CREATE failed: ClientException: Container PUT failed: http://172.18.79.141:8080/v1/AUTH_987dca1ec2a8495183deb0d757a7981c/heat-939313653-SwiftContainerWebsite-mmopeyh44265 403 Forbidden [first 60 chars of response] <html><h1>Forbidden</h1><p>Access was denied to this resourc'

The full log of the test run you can find here http://paste.openstack.org/show/224954.

It looks like no dsvm check job runs these tests and that is why we didn't encounter this issue earlier.
I have found the commit that breaks these tests. https://github.com/openstack/tempest/commit/af9d94ef35e507a27f88153319edf8d7552ed08e

In order to fix the tests we should add the following deleted code lines to the file tempest/api/orchestration/stacks/test_swift_resources.py:

    @classmethod
    def setup_credentials(cls):
        super(SwiftResourcesTestJSON, cls).setup_credentials()
        cls.os = clients.Manager()

After adding these code lines we have working tests again (http://paste.openstack.org/show/224955/).

Changed in tempest:
assignee: nobody → Yaroslav Lobankov (ylobankov)
summary: - Heat tests, that are related to Swift resources, don't work
+ Heat tests for Swift resources don't work
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tempest (master)

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

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

Reviewed: https://review.openstack.org/183801
Committed: https://git.openstack.org/cgit/openstack/tempest/commit/?id=1876b5dc062fb01e1bab174728439947f107ff9a
Submitter: Jenkins
Branch: master

commit 1876b5dc062fb01e1bab174728439947f107ff9a
Author: Yaroslav Lobankov <email address hidden>
Date: Sat May 16 17:17:06 2015 +0300

    Fixing broken Heat tests for Swift resources

    I have encountered it recently. I just ran Heat tests for Swift
    resources and saw that these tests are broken. It looks like no dsvm
    check job runs these tests and that is why we didn't encounter this
    issue earlier. I have found the commit that breaks these tests.
    https://review.openstack.org/#/c/153681/

    In order to fix the tests we should add the following code lines
    to the file tempest/api/orchestration/stacks/test_swift_resources.py:

        @classmethod
        def setup_credentials(cls):
            super(SwiftResourcesTestJSON, cls).setup_credentials()
            stack_owner_role = CONF.orchestration.stack_owner_role
            operator_role = CONF.object_storage.operator_role
            cls.os = cls.get_client_manager(
                roles=[stack_owner_role, operator_role])

    After adding these code lines we have working tests again.

    Closes-Bug: #1455775

    Change-Id: I5884149fef95c50d62ffde6e5c9488da1a9d6a55

Changed in tempest:
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.