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

Function TestSCPCommandUseInsecureCipher

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

Source from the content-addressed store, hash-verified

445}
446
447func TestSCPCommandUseInsecureCipher(t *testing.T) {
448 ssh := &MakeConfig{
449 Server: "localhost",
450 User: "drone-scp",
451 Port: "22",
452 KeyPath: "./tests/.ssh/id_rsa",
453 UseInsecureCipher: true,
454 }
455
456 err := ssh.Scp("./tests/a.txt", "a.txt")
457 assert.NoError(t, err)
458
459 u, err := user.Lookup("drone-scp")
460 if err != nil {
461 t.Fatalf("Lookup: %v", err)
462 }
463
464 // check file exist
465 if _, err := os.Stat(path.Join(u.HomeDir, "a.txt")); os.IsNotExist(err) {
466 t.Fatalf("SCP-error: %v", err)
467 }
468}
469
470// TestRootAccount test root account
471func TestRootAccount(t *testing.T) {

Callers

nothing calls this directly

Calls 1

ScpMethod · 0.95

Tested by

no test coverage detected