MCPcopy Create free account
hub / github.com/Driver-C/tryssh / TestTryCopy_SourceRemote_WithAlias

Function TestTryCopy_SourceRemote_WithAlias

pkg/control/scp_integration_test.go:70–79  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

68}
69
70func TestTryCopy_SourceRemote_WithAlias(t *testing.T) {
71 cfg, _ := setupSCPTestConfig(t)
72
73 ctrl := NewScpController("server1:/remote/file.txt", "/local/dest.txt", cfg)
74 ctrl.TryCopy("", 1, false, 1*time.Nanosecond)
75
76 // Alias should be resolved to IP
77 assert.Equal(t, "192.168.1.1", ctrl.destIP)
78 assert.Equal(t, "192.168.1.1:/remote/file.txt", ctrl.source)
79}
80
81func TestTryCopy_DestRemote_WithAlias(t *testing.T) {
82 cfg, _ := setupSCPTestConfig(t)

Callers

nothing calls this directly

Calls 3

TryCopyMethod · 0.95
setupSCPTestConfigFunction · 0.85
NewScpControllerFunction · 0.85

Tested by

no test coverage detected