From 5d5edde8a87d7f1a76fc2150d82b998c0a092cbf Mon Sep 17 00:00:00 2001 From: Andrey Shestakov Date: Mon, 6 Feb 2017 14:44:23 +0200 Subject: [PATCH] Remove trailing slash from base_url in tempest plugin When service endpoint url has trailing slash, tempest plugin constructs wrong url with two slashes. Added rstrip('/') for base_url for ensure trailing slash is absent. Change-Id: Id9455779156147e9d3001985d8ab9a367095bcce --- ironic_tempest_plugin/tests/api/admin/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ironic_tempest_plugin/tests/api/admin/base.py b/ironic_tempest_plugin/tests/api/admin/base.py index 7aeb63d42f..cc3636b998 100644 --- a/ironic_tempest_plugin/tests/api/admin/base.py +++ b/ironic_tempest_plugin/tests/api/admin/base.py @@ -228,7 +228,7 @@ class BaseBaremetalTest(api_version_utils.BaseMicroversionTest, def validate_self_link(self, resource, uuid, link): """Check whether the given self link formatted correctly.""" expected_link = "{base}/{pref}/{res}/{uuid}".format( - base=self.client.base_url, + base=self.client.base_url.rstrip('/'), pref=self.client.uri_prefix, res=resource, uuid=uuid)