Only metrics that match the 'name[]' query string param appear
(self)
| 170 | ) |
| 171 | |
| 172 | async def test_qs_parsing(self): |
| 173 | """Only metrics that match the 'name[]' query string param appear""" |
| 174 | |
| 175 | metrics = [("asdf", "first test metric", 1), ("bsdf", "second test metric", 2)] |
| 176 | |
| 177 | for m in metrics: |
| 178 | self.increment_metrics(*m) |
| 179 | |
| 180 | for i_1 in range(len(metrics)): |
| 181 | async with self.client.get( |
| 182 | "/metrics", |
| 183 | params={"name[]": f"{metrics[i_1][0]}_total"}, |
| 184 | ) as response: |
| 185 | output = await response.text() |
| 186 | self.assert_metrics(output, *metrics[i_1]) |
| 187 | |
| 188 | for i_2 in range(len(metrics)): |
| 189 | if i_1 == i_2: |
| 190 | continue |
| 191 | |
| 192 | self.assert_not_metrics(output, *metrics[i_2]) |
nothing calls this directly
no test coverage detected