Skip to content

Conversation

@JoshuaWatt
Copy link
Contributor

@JoshuaWatt JoshuaWatt commented Mar 20, 2021

Description

Adds a context manager function that will forward a port on the local
host to a port on the target

Checklist

  • Documentation for the feature
  • Tests for the feature
  • The arguments and description in doc/configuration.rst have been updated
  • Add a section on how to use the feature to doc/usage.rst
  • Add a section on how to use the feature to doc/development.rst
  • CHANGES.rst has been updated
  • PR has been tested
  • Man pages have been regenerated

@codecov
Copy link

codecov bot commented Mar 20, 2021

Codecov Report

Merging #751 (51f3fe5) into master (3bde512) will decrease coverage by 0.0%.
The diff coverage is 56.0%.

Impacted file tree graph

@@           Coverage Diff            @@
##           master    #751     +/-   ##
========================================
- Coverage    58.1%   58.1%   -0.1%     
========================================
  Files         136     136             
  Lines        9780    9861     +81     
========================================
+ Hits         5691    5736     +45     
- Misses       4089    4125     +36     
Impacted Files Coverage Δ
labgrid/remote/client.py 45.9% <34.6%> (-0.6%) ⬇️
labgrid/driver/sshdriver.py 59.1% <93.3%> (+4.6%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3bde512...51f3fe5. Read the comment docs.

@JoshuaWatt JoshuaWatt force-pushed the target-port-forward branch 2 times, most recently from bffca38 to e2bba6d Compare March 22, 2021 16:16
@JoshuaWatt
Copy link
Contributor Author

I'll happily add tests if someone knows of a good way of testing the port bindings

@Emantor
Copy link
Member

Emantor commented Mar 23, 2021

I'll happily add tests if someone knows of a good way of testing the port bindings

We already have some tests for port forwarding in test_util.py, with ssh_localhost as a fixture you should be able to test the port forwards for the SSHDriver using the same mechanism.

Adds a context manager function that will forward connections to a port
on the local host to a port on the target, and target ports to a port on
the local host

Signed-off-by: Joshua Watt <Joshua.Watt@garmin.com>
@JoshuaWatt JoshuaWatt force-pushed the target-port-forward branch from e2bba6d to 884545f Compare March 25, 2021 22:27
Adds a subcommand to forward ports between localhost and the target

Signed-off-by: Joshua Watt <Joshua.Watt@garmin.com>
@JoshuaWatt JoshuaWatt force-pushed the target-port-forward branch from 884545f to 51f3fe5 Compare March 25, 2021 22:29
Copy link
Member

@jluebbe jluebbe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good now, thanks for the test cases!

@jluebbe jluebbe requested a review from Emantor March 26, 2021 09:53
@jluebbe jluebbe assigned Emantor and unassigned JoshuaWatt Mar 26, 2021
@Emantor Emantor merged commit 6b0fc33 into labgrid-project:master Mar 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants