Repository navigation
Commit dd2000d
authored
fix(api_core): support suppress_metrics_header fallback in AuthMetadataPlugin (#18029)
[PR #17616
](#17616)
introduced logic in grpc_helpers.py to pass
`suppress_metrics_header=True` to
`google.auth.transport.grpc.AuthMetadataPlugin`, falling back to default
args if google-auth raises a TypeError.
Following the release of `google-auth==2.56.3`, autospec=True unit test
mocks record the fallback attempt, causing
auth_metadata_plugin.assert_called_once_with to fail due to multiple
invocations.
Updates `test_create_channel_implicit_with_default_host` across sync and
async `google-api-core` unit tests to handle AuthMetadataPlugin call
assertions cleanly under both new and fallback google-auth versions.1 parent 93d1d20 commit dd2000d
2 files changed
Lines changed: 17 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
421 | 421 | | |
422 | 422 | | |
423 | 423 | | |
424 | | - | |
425 | | - | |
426 | | - | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
427 | 433 | | |
428 | 434 | | |
429 | 435 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
453 | 453 | | |
454 | 454 | | |
455 | 455 | | |
456 | | - | |
457 | | - | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
458 | 460 | | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
459 | 465 | | |
460 | 466 | | |
461 | 467 | | |
| |||
0 commit comments