From 97beb983e6932f5bfee0364d0f86fe1c1ab7b470 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Wed, 18 Feb 2026 22:04:05 +0900 Subject: [PATCH] Fix injection of [cors] allowed_origin Using a string value was deprecated in oslo.middleware 3.15.0[1] which was released 9 years age. The value of this option has been treated as a list value since then. [1] 7e519d008f7743d75ec299095060a70d5fd00f99 The latest oslo.middelware release removed the deprecated handling. Change-Id: Ib88c046af14f5d5de0d410a35a702b7a2322c832 Signed-off-by: Takashi Kajinami --- nova/tests/functional/test_middleware.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nova/tests/functional/test_middleware.py b/nova/tests/functional/test_middleware.py index 3a4d8d64ef..ca225409bd 100644 --- a/nova/tests/functional/test_middleware.py +++ b/nova/tests/functional/test_middleware.py @@ -36,7 +36,7 @@ class TestCORSMiddleware(api_sample_base.ApiSampleTestBaseV21): def _mock_getattr(instance, key): if key != 'allowed_origin': return self._original_call_method(instance, key) - return "http://valid.example.com" + return ["http://valid.example.com"] self._original_call_method = cfg.ConfigOpts.GroupAttr.__getattr__ cfg.ConfigOpts.GroupAttr.__getattr__ = _mock_getattr