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
Unknown Object (File)
Wed, Jun 26, 3:28 PM
Unknown Object (File)
Wed, Jun 26, 11:53 AM
Unknown Object (File)
Sat, Jun 22, 9:54 PM
Unknown Object (File)
Thu, Jun 13, 10:06 PM
Unknown Object (File)
Thu, May 30, 9:24 PM
Unknown Object (File)
Thu, May 30, 9:24 PM
Unknown Object (File)
May 26 2024, 3:23 PM
Unknown Object (File)
May 24 2024, 6:34 PM
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
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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 ↗(On Diff #19553)

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 ↗(On Diff #19553)

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.