(t *testing.T)
| 89 | } |
| 90 | |
| 91 | func TestHTTPClientFor(t *testing.T) { |
| 92 | h := &mocks.MockHost{PeerStore: &mocks.MockPeerstore{}} |
| 93 | |
| 94 | n, err := New(h) |
| 95 | if err != nil { |
| 96 | t.Fatal(err) |
| 97 | } |
| 98 | |
| 99 | c := n.HTTPClientFor("test-peer") |
| 100 | if c == nil { |
| 101 | t.Fatal("expected non-nil client") |
| 102 | } |
| 103 | |
| 104 | if c.Transport == nil { |
| 105 | t.Fatal("expected non-nil transport") |
| 106 | } |
| 107 | |
| 108 | if c.Timeout == 0 { |
| 109 | t.Fatal("expected non-zero timeout") |
| 110 | } |
| 111 | } |
| 112 | |
| 113 | func TestRoundTripperFor(t *testing.T) { |
| 114 | h := &mocks.MockHost{PeerStore: &mocks.MockPeerstore{}} |
nothing calls this directly
no test coverage detected