Page MenuHomePhabricator

[services/commtest] Tunnelbroker - Adding the tonic client builder function
ClosedPublic

Authored by max on Dec 19 2022, 6:42 AM.
Tags
None
Referenced Files
F3515074: D5928.id19948.diff
Sun, Dec 22, 7:23 AM
F3514916: D5928.id20182.diff
Sun, Dec 22, 6:58 AM
F3513788: D5928.diff
Sun, Dec 22, 2:05 AM
Unknown Object (File)
Wed, Dec 18, 6:17 PM
Unknown Object (File)
Wed, Dec 18, 6:17 PM
Unknown Object (File)
Wed, Dec 18, 6:17 PM
Unknown Object (File)
Wed, Dec 18, 6:17 PM
Unknown Object (File)
Wed, Dec 18, 10:59 AM
Subscribers

Details

Summary

This diff introduces a function to build a Tonic client for further API calls in integrational tests. The pointer to the client will be passed to the helper functions (in D5931) instead of making the "global" client instance.

We are using COMM_SERVICES_PORT_TUNNELBROKER environment variable to provide a port to connect to the Tunnelbroker.
The COMM_SERVICES_HOST_TUNNELBROKER environment variable provides a host to connect to the Tunnelbroker.

Linear task: ENG-1657

Test Plan

The commtest app is successfully built and the tests are successfully passed in the following D5931 using this function results.

Diff Detail

Repository
rCOMM Comm
Branch
commtest-tonic-client-builder
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

max held this revision as a draft.
max published this revision for review.Dec 19 2022, 7:12 AM
max edited the summary of this revision. (Show Details)
max edited the test plan for this revision. (Show Details)
max added a reviewer: bartek. max added 1 blocking reviewer(s): jon.
max edited the summary of this revision. (Show Details)
jon added inline comments.
services/commtest/src/tunnelbroker/tunnelbroker_utils.rs
11

Should we have an expected default? e.g. 41111. Most services will have a default tcp port.

This revision now requires changes to proceed.Dec 19 2022, 12:10 PM

Fixing a port environment variable, adding default value.

max added inline comments.
services/commtest/src/tunnelbroker/tunnelbroker_utils.rs
11

Should we have an expected default? e.g. 41111. Most services will have a default tcp port.

I think it's ok to do this. I've added a default port for the service which is also in the .env file.
Thanks, @jon!

This revision is now accepted and ready to land.Dec 21 2022, 1:59 PM
max marked an inline comment as done.

Rebasing on master changes.