MCPcopy Create free account
hub / github.com/appleboy/easyssh-proxy / TestProxyClientSSHCommand

Function TestProxyClientSSHCommand

easyssh_test.go:354–373  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

352}
353
354func TestProxyClientSSHCommand(t *testing.T) {
355 ssh := &MakeConfig{
356 User: "drone-scp",
357 Server: "localhost",
358 Port: "22",
359 KeyPath: "./tests/.ssh/id_rsa",
360 Proxy: DefaultConfig{
361 User: "drone-scp",
362 Server: "localhost",
363 Port: "22",
364 KeyPath: "./tests/.ssh/id_rsa",
365 },
366 }
367
368 outStr, errStr, isTimeout, err := ssh.Run("whoami")
369 assert.Equal(t, "drone-scp\n", outStr)
370 assert.Equal(t, "", errStr)
371 assert.True(t, isTimeout)
372 assert.NoError(t, err)
373}
374
375func TestSCPCommandWithPassword(t *testing.T) {
376 ssh := &MakeConfig{

Callers

nothing calls this directly

Calls 1

RunMethod · 0.95

Tested by

no test coverage detected