Disable unexpected endpoint discovery in unit tests

The latest keystonemiddleware release attempts to discover identity
endpoint unless www_authenticate_uri is set. This behavior is not yet
properly mocked in AuthTokenFixture yet.

Until the fixture is updated, override the option to disable
the discovery.

Change-Id: Ia05db0a9b791374afed627ac1536625d4758fc57
Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
This commit is contained in:
Takashi Kajinami committed 2026-05-20 08:17:20 +00:00
1 parent 78eb2a7dd3
commit d74cbfa772
1 file changed
+6
+6
View File
@@ -20,6 +20,7 @@ import pecan
import pecan.testing
from blazar.api import context as api_context
from blazar import config as cfg
from blazar import context
from blazar.manager.leases import rpcapi as leases_api
from blazar.manager.oshosts import rpcapi as hosts_rpcapi
@@ -85,6 +86,11 @@ class APITest(tests.TestCase):
# enable_acl set to False
if enable_acl:
# TODO(tkajinam): Remove this once AuthTokenFixture is fixed.
# https://review.opendev.org/989187
cfg.CONF.set_override('www_authenticate_uri',
'http://localhost/identity',
group='keystone_authtoken')
self.keystone_middleware = self.useFixture(
fixture.AuthTokenFixture())