MCPcopy
hub / github.com/gliderlabs/ssh / TestLocalPortForwardingRespectsCallback

Function TestLocalPortForwardingRespectsCallback

tcpip_test.go:70–83  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

68}
69
70func TestLocalPortForwardingRespectsCallback(t *testing.T) {
71 t.Parallel()
72
73 l, client, cleanup := newTestSessionWithForwarding(t, false)
74 defer cleanup()
75
76 _, err := client.Dial("tcp", l.Addr().String())
77 if err == nil {
78 t.Fatalf("Expected error connecting to %v but it succeeded", l.Addr().String())
79 }
80 if !strings.Contains(err.Error(), "port forwarding is disabled") {
81 t.Fatalf("Expected permission error but got %#v", err)
82 }
83}

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…