(t *testing.T)
| 68 | } |
| 69 | |
| 70 | func 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 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…