Created
December 5, 2023 21:52
-
-
Save ryantm/4963855cc0ff8fe688ab96c7b54d5e87 to your computer and use it in GitHub Desktop.
This file contains 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
func TestSSH(t *testing.T) { | |
//setup ssh session | |
err := session.RequestPty("dumb", 25, 80, ssh.TerminalModes{ssh.ECHO: 0,ssh.ONLCR: 0,}) | |
require.NoError(t, err) | |
output, err := session.Output("echo hello world") | |
require.NoError(t, err) | |
require.Equal(t, "hello world\n", string(output)) //here we get output = "" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment