Skip to content

Add integration test to check connection from jumpbox to hosts#117

Merged
Adamkadaban merged 4 commits intomonorepofrom
ssh-tests
Jul 18, 2025
Merged

Add integration test to check connection from jumpbox to hosts#117
Adamkadaban merged 4 commits intomonorepofrom
ssh-tests

Conversation

@Adamkadaban
Copy link
Copy Markdown
Member

Checklist

  • I have added a version label to my PR (e.g., patch, minor, major).
  • I have tested my changes locally and verified they work as expected.
  • I have added relevant tests to cover my changes.
  • I have made any necessary updates to the documentation.

Description

Add integration test to check connection from jumpbox to hosts using paramiko channels.

Fixes: #105

@Adamkadaban Adamkadaban requested a review from alexchristy as a code owner July 18, 2025 04:51
@Adamkadaban Adamkadaban added the tests Add or improve existing tests label Jul 18, 2025
@Adamkadaban Adamkadaban requested a review from Nareshp1 as a code owner July 18, 2025 04:51
@Adamkadaban
Copy link
Copy Markdown
Member Author

merging into monorepo branch for now since it might take a while for that PR

@Adamkadaban Adamkadaban requested review from Copilot and removed request for Nareshp1 and alexchristy July 18, 2025 04:53
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds an integration test to verify SSH connectivity from a jumpbox to all VMs in a range. The test validates that the jumpbox can successfully tunnel SSH connections to hosts with different operating systems using appropriate SSH usernames.

  • Adds test_jumpbox_to_vm_connections method to test SSH tunneling through jumpbox to all VMs
  • Creates OS_SSH_USERNAME_MAP mapping operating systems to their default SSH usernames
  • Implements proper connection handling with cleanup for both jumpbox and target VM connections

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
api/tests/integration/api/v1/test_ranges.py Adds comprehensive integration test for jumpbox-to-VM SSH connectivity with OS-specific username handling
api/src/app/enums/operating_systems.py Adds SSH username mapping for all supported operating systems

@Adamkadaban
Copy link
Copy Markdown
Member Author

no idea why integration tests are failing. they work perfectly on my machine

Copy link
Copy Markdown
Member

@alexchristy alexchristy left a comment

Choose a reason for hiding this comment

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

Looks great! Thank you for cleaning up my other test.

@alexchristy
Copy link
Copy Markdown
Member

Also based on my quick research we should be able to extract the 'default' username from each of the deployed hosts using the correct terraform output configuration, so we don't have to maintain a lot of username maps in the future.

Issue for this here: #104

@Adamkadaban Adamkadaban merged commit 117ceb3 into monorepo Jul 18, 2025
5 of 7 checks passed
@Adamkadaban Adamkadaban deleted the ssh-tests branch July 24, 2025 04:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tests Add or improve existing tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants