fix(gateway): address SonarQube PR-mode findings on F2/F3 code
- data_sink.py: _IDENTIFIER_RE uses \w+/re.ASCII instead of the equivalent-but-verbose [A-Za-z0-9_]+ character class (verified same match behavior). NOSONAR on update_write_status's 'async with no await inside' - deliberate, per the ponytail comment already in the method body (uniform async interface across DataSink, no async pg driver). - test_grpc_server.py: move make_request() out of the pytest.raises block so exactly one call can raise the expected exception. - sonar-project.properties: exclude ingestor/proto/ (generated grpc code) from analysis - its ReadTag/etc. names are dictated by grpcio-tools, not a style choice, and renaming them breaks the wire.
This commit is contained in:
@@ -60,8 +60,9 @@ async def test_read_tag_aborts_with_internal_on_engine_failure():
|
||||
context = AsyncMock()
|
||||
context.abort.side_effect = grpc.RpcError('aborted')
|
||||
|
||||
request = make_request()
|
||||
with pytest.raises(grpc.RpcError):
|
||||
await servicer.ReadTag(make_request(), context)
|
||||
await servicer.ReadTag(request, context)
|
||||
|
||||
context.abort.assert_awaited_once()
|
||||
args = context.abort.call_args.args
|
||||
|
||||
Reference in New Issue
Block a user