Browse Source

chore(CapMan): Fix tests blocking Outcomes Allocation Policy (#50096)

Blocks https://github.com/getsentry/snuba/pull/4275
Rahul Kumar Saini 1 year ago
parent
commit
af9fb08e55
1 changed files with 15 additions and 2 deletions
  1. 15 2
      tests/sentry/tsdb/test_snuba.py

+ 15 - 2
tests/sentry/tsdb/test_snuba.py

@@ -165,7 +165,13 @@ class SnubaTSDBTest(OutcomesSnubaTest):
         ]:
             # Query SnubaTSDB
             response = self.db.get_range(
-                tsdb_model, [self.organization.id], self.start_time, self.now, granularity, None
+                tsdb_model,
+                [self.organization.id],
+                self.start_time,
+                self.now,
+                granularity,
+                None,
+                tenant_ids={"referrer": "tests", "organization_id": 1},
             )
 
             # Assert that the response has values set for the times we expect, and nothing more
@@ -308,7 +314,13 @@ class SnubaTSDBTest(OutcomesSnubaTest):
             (TSDBModel.project_total_blacklisted, 10, floor_to_10s_epoch, 4, 5),
         ]:
             response = self.db.get_range(
-                tsdb_model, [self.project.id], self.start_time, self.now, granularity, None
+                tsdb_model,
+                [self.project.id],
+                self.start_time,
+                self.now,
+                granularity,
+                None,
+                tenant_ids={"referrer": "tests", "organization_id": 1},
             )
 
             # Assert that the response has values set for the times we expect, and nothing more
@@ -448,6 +460,7 @@ class SnubaTSDBTest(OutcomesSnubaTest):
                 self.now,
                 granularity,
                 None,
+                tenant_ids={"referrer": "tests", "organization_id": 123},
             )
 
             # Assert that the response has values set for the times we expect, and nothing more