From 21a5f3eb85602fe4ea171aae79e6691a96859cb7 Mon Sep 17 00:00:00 2001 From: Jaromir Wysoglad Date: Fri, 20 Jun 2025 04:14:13 -0400 Subject: [PATCH] Add a testcase for specifying project label Test that a project label with the configured current project is still added to queries even when the query tries to specify a project on its own. Change-Id: I920382c6c43971fef7ccc63fa10fcd5f4627cb09 --- observabilityclient/tests/unit/test_rbac.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/observabilityclient/tests/unit/test_rbac.py b/observabilityclient/tests/unit/test_rbac.py index d5f3bd6..a5fb9e0 100644 --- a/observabilityclient/tests/unit/test_rbac.py +++ b/observabilityclient/tests/unit/test_rbac.py @@ -167,6 +167,12 @@ class PromQLRbacTest(testtools.TestCase): f"{{project='{self.project_id}'}}" f"[10m])))" ) + ), ( + "test_query{project='some_id'}", + + (f"test_query{{project='some_id', " + f"project='{self.project_id}'}}" + ) ) ]