(t *testing.T)
| 102 | } |
| 103 | |
| 104 | func TestRProcessPeerError(t *testing.T) { |
| 105 | tests := []testFields{ |
| 106 | { |
| 107 | name: "error for existing peer", |
| 108 | steps: []pcFsmMakeStateValues{ |
| 109 | { |
| 110 | currentState: ¶ms{items: []pcBlock{{"P1", 1}, {"P2", 2}}}, |
| 111 | event: scPeerError{peerID: "P2"}, |
| 112 | wantState: ¶ms{items: []pcBlock{{"P1", 1}}}, |
| 113 | wantNextEvent: noOp, |
| 114 | }, |
| 115 | }, |
| 116 | }, |
| 117 | { |
| 118 | name: "error for unknown peer", |
| 119 | steps: []pcFsmMakeStateValues{ |
| 120 | { |
| 121 | currentState: ¶ms{items: []pcBlock{{"P1", 1}, {"P2", 2}}}, |
| 122 | event: scPeerError{peerID: "P3"}, |
| 123 | wantState: ¶ms{items: []pcBlock{{"P1", 1}, {"P2", 2}}}, |
| 124 | wantNextEvent: noOp, |
| 125 | }, |
| 126 | }, |
| 127 | }, |
| 128 | } |
| 129 | |
| 130 | executeProcessorTests(t, tests) |
| 131 | } |
| 132 | |
| 133 | func TestPcBlockResponse(t *testing.T) { |
| 134 | tests := []testFields{ |
nothing calls this directly
no test coverage detected
searching dependent graphs…