Commit a316d7e
authored
Fix auth for sample upsert stream (#48)
The client currently gets auth and signing metadata from
frequenz-client-base only for unary-unary and unary-stream RPCs.
UpsertMarketLocationSamplesStream is a streaming upsert call, so it
missed the key, timestamp, nonce, and signature metadata and the service
rejected it with a missing-signature authentication error.
This attaches the same metadata explicitly for the upsert stream call
and adds a regression test covering the streaming path.
Verified with:
- uv run pytest tests/test_marketmetering.py -q
- end-to-end client flow against
market-metering.eu-1.production.api.frequenz.com covering list, create,
update, deactivate, activate, upsert_samples, and stream_samples6 files changed
Lines changed: 1224 additions & 1 deletion
File tree
- src/frequenz/client/marketmetering
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| 56 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
183 | 183 | | |
184 | 184 | | |
185 | 185 | | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
186 | 189 | | |
187 | 190 | | |
188 | 191 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
8 | 12 | | |
9 | 13 | | |
10 | 14 | | |
| |||
152 | 156 | | |
153 | 157 | | |
154 | 158 | | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
155 | 186 | | |
156 | 187 | | |
157 | 188 | | |
| |||
336 | 367 | | |
337 | 368 | | |
338 | 369 | | |
| 370 | + | |
339 | 371 | | |
340 | 372 | | |
341 | 373 | | |
| |||
0 commit comments