Replace test-port-forwarding.pl with BATS test#4677
Open
IrvingMg wants to merge 1 commit intolima-vm:masterfrom
Open
Replace test-port-forwarding.pl with BATS test#4677IrvingMg wants to merge 1 commit intolima-vm:masterfrom
IrvingMg wants to merge 1 commit intolima-vm:masterfrom
Conversation
21d51af to
f6a7801
Compare
AkihiroSuda
reviewed
Mar 8, 2026
AkihiroSuda
reviewed
Mar 8, 2026
AkihiroSuda
reviewed
Mar 8, 2026
AkihiroSuda
reviewed
Mar 8, 2026
AkihiroSuda
reviewed
Mar 8, 2026
AkihiroSuda
reviewed
Mar 8, 2026
AkihiroSuda
requested changes
Mar 8, 2026
Member
AkihiroSuda
left a comment
There was a problem hiding this comment.
Thanks, but the perl script is not expected to be line-for-line translated to BATS.
56b80d7 to
77a646c
Compare
AkihiroSuda
reviewed
Mar 15, 2026
AkihiroSuda
reviewed
Mar 15, 2026
AkihiroSuda
reviewed
Mar 15, 2026
| line="${line//SSH_LOCAL_PORT/$ssh_local_port}" | ||
|
|
||
| local mode="" guest_ip="" guest_port="" host_ip="" host_port="" host_socket="" | ||
| if [[ $line =~ ^(forward|ignore):[[:space:]]+([0-9.:]+)[[:space:]]+([0-9]+)([[:space:]]+-\>[[:space:]]+(.+))? ]]; then |
Contributor
Author
There was a problem hiding this comment.
The test specs are YAML comments (# forward:, # ignore:) which yq can't parse.
AkihiroSuda
reviewed
Mar 15, 2026
AkihiroSuda
reviewed
Mar 15, 2026
AkihiroSuda
reviewed
Mar 15, 2026
AkihiroSuda
reviewed
Mar 15, 2026
AkihiroSuda
reviewed
Mar 15, 2026
AkihiroSuda
reviewed
Mar 15, 2026
77a646c to
f590b74
Compare
Signed-off-by: Irving Mondragón <mirvingr@gmail.com>
f590b74 to
41ac7d1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replace
hack/test-port-forwarding.plwithhack/bats/extras/port-forwarding.bats, usinglimactl watch --jsonevents instead of parsing log files.Logs from both the Perl and BATS runs are attached below for comparison.
Fixes #4389