]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Fix the end point test for client
authorManjeet Singh Bhatia <manjeet.s.bhatia@intel.com>
Thu, 19 Nov 2015 15:51:05 +0000 (15:51 +0000)
committerManjeet Singh Bhatia <manjeet.s.bhatia@intel.com>
Thu, 19 Nov 2015 15:55:58 +0000 (15:55 +0000)
Due to recent change in neutronclient the endpoint value got changes
in following patch.

https://review.openstack.org/#/c/236325/

This patch will test both public or publicURL endpoints.

Change-Id: I0dffb06c5151203e9fe2ab041a7beb028a39aac0
Closes-bug: #1517579

neutron/tests/unit/debug/test_shell.py

index a13527312d50ebe2ee3faaeae6ffabd969e08085..e5569da9aa8d8aef1e86e495a386134dcf889036 100644 (file)
@@ -88,10 +88,11 @@ class ShellTest(base.BaseTestCase):
         shell = debug_shell.NeutronDebugShell(
                 openstack_shell.NEUTRON_API_VERSION)
         parser = shell.build_option_parser('descr', '2.0')
+        os_endpoints = ['public', 'publicURL']
 
         # Neither $OS_ENDPOINT_TYPE nor --os-endpoint-type
         namespace = parser.parse_args([])
-        self.assertEqual('publicURL', namespace.os_endpoint_type)
+        self.assertIn(namespace.os_endpoint_type, os_endpoints)
 
         # --endpoint-type but not $OS_ENDPOINT_TYPE
         namespace = parser.parse_args(['--os-endpoint-type=admin'])