Adjust '410 Gone' exception in service broker negative tests

Tempest-lib 0.12.0 contains necessary code for checking correct exception.
This patch replaces 'UnexpectedResponceCode' exception to correct 'Gone' exception.

Aslo, this patch add expectedFail for negative test.

Change-Id: Ib460b6fc495060a1bd6dd7d0443ff983f8e9f06b
Related-Bug: #1527949
This commit is contained in:
Victor Ryzhenkin 2015-12-20 03:32:11 +03:00
parent e306eecd1c
commit 257315a2e0
1 changed files with 8 additions and 3 deletions

View File

@ -13,6 +13,8 @@
# License for the specific language governing permissions and limitations
# under the License.
import unittest
from tempest import test
from tempest_lib import exceptions
@ -22,12 +24,15 @@ from murano_tempest_tests import utils
class ServiceBrokerNegativeTest(base.BaseServiceBrokerAdminTest):
# NOTE(freerunner): Tempest will fail with this test, because its
# _parse_resp function trying to parse a nullable JSON.
# https://review.openstack.org/#/c/260659/
# XFail until this one merged and tempest-lib released.
@unittest.expectedFailure
@test.attr(type=['gate', 'negative'])
def test_get_status_with_not_present_instance_id(self):
not_present_instance_id = utils.generate_uuid()
# TODO(freerunner) Tempest REST client can't catch code 410 yet.
# Need to update the test, when tempest-lib will have this code.
self.assertRaises(
exceptions.UnexpectedResponseCode,
exceptions.Gone,
self.service_broker_client.get_last_status,
not_present_instance_id)