VersionTestCase uses the same port for admin and public endpoints

Bug #1478000 reported by Alexey Miroshkin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Fix Released
Medium
Alexey Miroshkin

Bug Description

VersionTestCase uses the same port for admin and public endpoints:

 port = random.randint(10000, 30000)
 self.config_fixture.config(group='eventlet_server', public_port=port,
                                   admin_port=port)

https://github.com/openstack/keystone/blob/master/keystone/tests/unit/test_versions.py#L648

It makes public and admin endpoints indistinguishable. As results bugs like "Keystone API GET 5000/v3 returns wrong endpoint URL in response body" https://bugs.launchpad.net/keystone/+bug/1381961 can't be catched by our tests (e.g. VersionTestCase.test_admin_version_v3)

In reality admin and public endpoints must be different:

 admin_port = random.randint(10000, 30000)
 public_port = random.randint(10000, 30000)
 self.config_fixture.config(group='eventlet_server', public_port=public_port,
                                   admin_port=admin_port)

After that VersionTestCase.test_admin_version_v3 will fail because of bug #1381961

Changed in keystone:
assignee: nobody → Alexey Miroshkin (amirosh)
tags: added: test-improvement
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to keystone (master)

Fix proposed to branch: master
Review: https://review.openstack.org/205667

Changed in keystone:
status: New → In Progress
Dolph Mathews (dolph)
Changed in keystone:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to keystone (master)

Reviewed: https://review.openstack.org/205667
Committed: https://git.openstack.org/cgit/openstack/keystone/commit/?id=37b81c95ed5b02ca98001430f26d457d1077693a
Submitter: Jenkins
Branch: master

commit 37b81c95ed5b02ca98001430f26d457d1077693a
Author: Alexey Miroshkin <email address hidden>
Date: Fri Jul 24 11:37:24 2015 -0700

    Assign different values to public and admin ports

    Some Version tests use the same port value for admin and public endpoints.
    It makes public and admin endpoints indistinguishable. As results bugs like
    "Keystone API GET 5000/v3 returns wrong endpoint URL in response body"
    (bug #1381961) can't be catched by tests.

    This fix assigns uniques values to public_port and admin_port. It also
    skips test_admin_version_v3 and test_admin because of bug #1381961 which can't
    be tested properly without this fix. Tests will be re-enabled as part of
    bug #1381961 fix.

    Change-Id: Ib973198ce609737e58cc14dd74cae3c7ef5c3cc8
    Closes-Bug: #1478000

Changed in keystone:
status: In Progress → Fix Committed
Changed in keystone:
milestone: none → liberty-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in keystone:
milestone: liberty-2 → 8.0.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.