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

Add network tcp-check command #472

Merged

Conversation

sfc-gh-ikryvanos
Copy link
Collaborator

@sfc-gh-ikryvanos sfc-gh-ikryvanos commented Aug 12, 2024

This PR introduces a new service network with new subcommand tcp-check to check TCP connectivity from sansshell target(s) to the given host and port

TODO:

  • cover with unit and integration tests

Is it was tested

Yes, on local

$ sanssh --targets=localhost network tcp-check 500.500.500:8080
- From target localhost:50042 to 500.500.500:8080, status: Failed - Connection refused
Connectivity check completed.

$ sanssh --targets=localhost network tcp-check google.com:80 --timeout 5
- From target localhost:50042 to google.com:80, status: Succeed
Connectivity check completed.

$ sanssh --targets=localhost network tcp-check 500.500:1 --timeout 5
- From target localhost:50042 to 500.500:1, status: Failed - No such host
Connectivity check completed.

$ sanssh --targets=localhost network tcp-check 10.0.5.3:1 --timeout 5
- From target localhost:50042 to 10.0.5.3:1, status: Failed - Connection timed out
Connectivity check completed.

How its look like

image

services/network/README.md Show resolved Hide resolved
services/network/README.md Outdated Show resolved Hide resolved
services/network/README.md Outdated Show resolved Hide resolved
services/util/cli/utill.go Outdated Show resolved Hide resolved
services/network/client/application/tcp-check.usecase.go Outdated Show resolved Hide resolved
services/network/server/server.go Show resolved Hide resolved
@sfc-gh-ikryvanos
Copy link
Collaborator Author

@sfc-gh-srhodes feel free to resolve discussions where issue being solved

@sfc-gh-ikryvanos sfc-gh-ikryvanos force-pushed the ikryvanos/SNOW-1571136_add-tcp-connectivity-check branch from 3a96c85 to 6e42532 Compare August 13, 2024 12:38
@sfc-gh-ikryvanos sfc-gh-ikryvanos marked this pull request as ready for review August 14, 2024 12:13
Copy link
Collaborator

@sfc-gh-srhodes sfc-gh-srhodes left a comment

Choose a reason for hiding this comment

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

Could you move the license check change to a different PR? It looks logically separate from the rest.

@sfc-gh-ikryvanos
Copy link
Collaborator Author

@sfc-gh-srhodes

Could you move the license check change to a different PR? It looks logically separate from the rest.

Done #473

@sfc-gh-ikryvanos sfc-gh-ikryvanos force-pushed the ikryvanos/SNOW-1571136_add-tcp-connectivity-check branch from 87b11e9 to 11b251e Compare August 27, 2024 13:26
@sfc-gh-ikryvanos sfc-gh-ikryvanos merged commit 4d1444b into main Aug 27, 2024
6 checks passed
@sfc-gh-ikryvanos sfc-gh-ikryvanos deleted the ikryvanos/SNOW-1571136_add-tcp-connectivity-check branch August 27, 2024 15:35
@sfc-gh-ikryvanos sfc-gh-ikryvanos changed the title SNOW-1571136 Add network tcp-check command Add network tcp-check command Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants