From 11cbbebea61ab0702559c1199b334654718c02ac Mon Sep 17 00:00:00 2001 From: Tetsuro Nakamura Date: Thu, 19 Jul 2018 16:08:51 +0900 Subject: [PATCH] Add test for invalid extra capability key The length of a host's extra capability key is limited to a maximum of 64 characters. This error has been changed from 500 Internal Server Error to 400 Bad Request in https://review.openstack.org/#/c/575699/. This patch adds a test for that change. Change-Id: I7f88354b917131d5848f3cfd7155ff60c19207a8 --- blazar_tempest_plugin/tests/api/gabbits/hosts.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/blazar_tempest_plugin/tests/api/gabbits/hosts.yaml b/blazar_tempest_plugin/tests/api/gabbits/hosts.yaml index 3118cc6..51cacc8 100644 --- a/blazar_tempest_plugin/tests/api/gabbits/hosts.yaml +++ b/blazar_tempest_plugin/tests/api/gabbits/hosts.yaml @@ -12,6 +12,15 @@ tests: GET: compute/v2.1/os-hypervisors status: 200 +- name: post new host with too long extra capability + POST: reservation/v1/os-hosts + data: + name: $HISTORY['get host name'].$RESPONSE['$.hypervisors[0].hypervisor_hostname'] + extra_capability_key_should_be_shorter_than_64_ABCDEFGHIJKLMNOPQRSTUVWXYZ: "foo" + status: 400 + response_strings: + - Extra capability key too long + - name: post new host POST: reservation/v1/os-hosts data: