Skip to content

refactor: move client testing script to appropriate location

  • Please check this box if this contribution uses AI-generated content (including content generated by GitLab Duo features) as outlined in the GitLab DCO & CLA

Closes #19

Hey, @jessieay I moved the code from duo_workflow_service/client.py to scripts/test_client.py. Couldn't test it though as I'm getting this error:

(duo-workflow-service-py3.10) ➜  duo-workflow-service git:(refactor/19-separate-test-client) ✗ python scripts/test_client.py
Traceback (most recent call last):
  File "/home/luna/Documents/duo-workflow-service/scripts/test_client.py", line 101, in <module>
    test_generate_token()
  File "/home/luna/Documents/duo-workflow-service/scripts/test_client.py", line 58, in test_generate_token
    response = stub.GenerateToken(request, metadata=metadata)
  File "/home/luna/.cache/pypoetry/virtualenvs/duo-workflow-service-t1KkliWx-py3.10/lib/python3.10/site-packages/grpc/_channel.py", line 1181, in __call__
    return _end_unary_response_blocking(state, call, False, None)
  File "/home/luna/.cache/pypoetry/virtualenvs/duo-workflow-service-t1KkliWx-py3.10/lib/python3.10/site-packages/grpc/_channel.py", line 1006, in _end_unary_response_blocking
    raise _InactiveRpcError(state)  # pytype: disable=not-instantiable
grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
        status = StatusCode.UNKNOWN
        details = "Unexpected <class 'jose.exceptions.JWSError'>: No PEM start marker "b'-----BEGIN PRIVATE KEY-----'" found"
        debug_error_string = "UNKNOWN:Error received from peer  {created_time:"2024-09-14T12:59:49.51505952+05:30", grpc_status:2, grpc_message:"Unexpected <class \'jose.exceptions.JWSError\'>: No PEM start marker \"b\'-----BEGIN PRIVATE KEY-----\'\" found"}"

Let me know if this is fine and it would be great if you could guide me on how to solve the above error (this would help me to take up more issues on this further). Thanks!

Edited by Chandra Kiran G

Merge request reports

Loading