[services/commtest] Tunnelbroker - Adding the API integration tests call function
Summary:
This diff introduces an integrational tests call for the Tunnelbroker API:
- We are checking for the wrong formatted deviceID: the server should return an error.
- Generating a keypair for making a signature.
- Getting a string to be signed from the Tunnelbroker server for the deviceID.
- Checking for the server error in case the provided signature is wrong.
- Create a new session (getting sessionID) by calling the Tunnelbroker new session API call.
Linear task: ENG-1657
Test Plan:
- The commtest app is successfully built.
- To run tests:
- Start the Tunnelbroker server using the nix develop --accept-flake-config -c bash -c "cargo run" command in the services/tunnelbroker directory.
- Open another terminal and run the following command from the services/commtest directory:
nix develop --accept-flake-config -c bash -c "cargo t --test tunnelbroker_integration_test -- --nocapture"
The expected result is that the commapp will be running the tests for the Tunnelbroker API.
Reviewers: jon, bartek
Reviewed By: jon, bartek
Subscribers: ashoat, tomek, atul
Differential Revision: https://phab.comm.dev/D5931