Comment 20 for bug 1306294

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)

Reviewed: https://review.openstack.org/100366
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=4320178066565608351c37a720922cbd36ac1f03
Submitter: Jenkins
Branch: master

commit 4320178066565608351c37a720922cbd36ac1f03
Author: Steven Hardy <email address hidden>
Date: Mon Jun 16 19:08:49 2014 +0100

    test_autoscaling refactor suspend/resume stubbing

    Rework to encapsulate the suspend/resume stubbing in functions and add a
    stub of the image validation, which is required because the properties
    get revalidated when we create the events associated with the state
    transition (ref bug #1324102).

    With the current keystoneclient mocking this is not visible in the
    tests because the error creating the client to do the validation is
    obscured by the fact that the Event constructor tolerates a validation
    error and the error creating the client is just treated as an unexpected
    validation error by the CustomConstraint code.

    Moving to a model where clients.keystone() is consistently mocked
    exposes the fact that we will try to connect to glance on suspend when
    the event is created if the validation is not correctly stubbed.

    Partial-Bug: #1306294

    Change-Id: I001d3a432397d4cdfaa62145228aad7eaf051b98