HomePhabricator
Diffusion Comm defc668d683c

[services/commtest] Tunnelbroker - Adding the API integration tests call…

Description

[services/commtest] Tunnelbroker - Adding the API integration tests call function

Summary:
This diff introduces an integrational tests call for the Tunnelbroker API:

  1. We are checking for the wrong formatted deviceID: the server should return an error.
  2. Generating a keypair for making a signature.
  3. Getting a string to be signed from the Tunnelbroker server for the deviceID.
  4. Checking for the server error in case the provided signature is wrong.
  5. Create a new session (getting sessionID) by calling the Tunnelbroker new session API call.

Linear task: ENG-1657

Test Plan:

  1. The commtest app is successfully built.
  2. 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

Details

Provenance
maxAuthored on Dec 19 2022, 6:50 AM
Reviewer
jon
Differential Revision
D5931: [services/commtest] Tunnelbroker - Adding the API integration tests call function
Parents
rCOMM2bdf04e88ab4: [native] Set SIWE WebView background color
Branches
Unknown
Tags
Unknown