From 16812e8979e6a58534b97d031c7d965c3a91f97f Mon Sep 17 00:00:00 2001 From: Balazs Gibizer Date: Mon, 2 Jul 2018 12:13:56 +0200 Subject: [PATCH] Regression test for bug 1779635 This patch adds a test that shows that placement allows setting the parent of an RP to itself. Change-Id: Ie81de7bdd43bfdb2ba48996f79d41efc2d70c1cd Related-Bug: #1779635 --- .../placement/gabbits/resource-provider.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/nova/tests/functional/api/openstack/placement/gabbits/resource-provider.yaml b/nova/tests/functional/api/openstack/placement/gabbits/resource-provider.yaml index d87ceeb4a1..c025ddc80d 100644 --- a/nova/tests/functional/api/openstack/placement/gabbits/resource-provider.yaml +++ b/nova/tests/functional/api/openstack/placement/gabbits/resource-provider.yaml @@ -723,3 +723,14 @@ tests: response_forbidden_headers: - cache-control - last-modified + +- name: fail updating a parent to itself + PUT: /resource_providers/$ENVIRON['PARENT_PROVIDER_UUID'] + request_headers: + content-type: application/json + data: + name: parent + parent_provider_uuid: $ENVIRON['PARENT_PROVIDER_UUID'] +# this reproduces bug 1779635 as this should be HTTP 400 as we have a loop now +# in the tree + status: 200