Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(e2e): Add test for connect http #5423

Merged
merged 3 commits into from
Jan 9, 2025
Merged

test(e2e): Add test for connect http #5423

merged 3 commits into from
Jan 9, 2025

Conversation

moduli
Copy link
Collaborator

@moduli moduli commented Jan 8, 2025

This PR adds an e2e test for the usage of boundary connect http.

The way this is achieved is a little roundabout. The test first connects to the SSH target and enables port forwarding. It then kicks off a process on a target to start a simple web server. Finally, the test creates a new target pointing to the web server and performs a connect http.

https://hashicorp.atlassian.net/browse/ICU-10838

@moduli moduli added the pr/no-milestone Ignores the Milestone Check label Jan 8, 2025
@moduli moduli requested a review from johanbrandhorst January 8, 2025 15:35
@moduli moduli marked this pull request as ready for review January 8, 2025 15:35
@moduli moduli requested a review from a team as a code owner January 8, 2025 15:35
require.NoError(t, err)
_, err = f.Write([]byte(fmt.Sprintf("while true; do nc -l -p %s -q 1 < somepage.html; done\n", destPort)))
require.NoError(t, err)
_, _ = io.Copy(io.Discard, f) // Not checking error here since it fails in CI for some reason
Copy link
Collaborator

Choose a reason for hiding this comment

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

🤔?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The theory: since the command being executed is an infinite loop, this ends up returning an error on session cancellation during cleanup since the command was interrupted.

@moduli moduli force-pushed the moduli-e2e-connect-http branch from 857c075 to b2f7056 Compare January 8, 2025 20:27
@moduli moduli requested a review from johanbrandhorst January 9, 2025 15:20
@moduli moduli merged commit 554195f into main Jan 9, 2025
66 of 67 checks passed
@moduli moduli deleted the moduli-e2e-connect-http branch January 9, 2025 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr/no-milestone Ignores the Milestone Check
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants