(t *testing.T)
| 63 | } |
| 64 | |
| 65 | func TestNgWriteComplex(t *testing.T) { |
| 66 | test := ngFileReadTest{ |
| 67 | linkType: layers.LinkTypeEthernet, |
| 68 | sections: []ngFileReadTestSection{ |
| 69 | { |
| 70 | sectionInfo: NgSectionInfo{ |
| 71 | Comment: "A test", |
| 72 | }, |
| 73 | ifaces: []NgInterface{ |
| 74 | { |
| 75 | Name: "in0", |
| 76 | Comment: "test0", |
| 77 | Description: "some test interface", |
| 78 | LinkType: layers.LinkTypeEthernet, |
| 79 | TimestampResolution: 3, |
| 80 | Statistics: NgInterfaceStatistics{ |
| 81 | LastUpdate: time.Unix(1519128000, 195312500).UTC(), |
| 82 | StartTime: time.Unix(1519128000-100, 195312500).UTC(), |
| 83 | EndTime: time.Unix(1519128000, 195312500).UTC(), |
| 84 | PacketsReceived: 100, |
| 85 | PacketsDropped: 1, |
| 86 | }, |
| 87 | }, |
| 88 | { |
| 89 | Name: "null0", |
| 90 | Description: "some test interface", |
| 91 | Filter: "none", |
| 92 | OS: "not needed", |
| 93 | LinkType: layers.LinkTypeEthernet, |
| 94 | TimestampOffset: 100, |
| 95 | Statistics: NgInterfaceStatistics{ |
| 96 | LastUpdate: time.Unix(1519128000, 195312500).UTC(), |
| 97 | }, |
| 98 | }, |
| 99 | }, |
| 100 | }, |
| 101 | }, |
| 102 | packets: []ngFileReadTestPacket{ |
| 103 | { |
| 104 | data: ngPacketSource[0], |
| 105 | ci: gopacket.CaptureInfo{ |
| 106 | Timestamp: time.Unix(1519128000-900, 195312500).UTC(), |
| 107 | Length: len(ngPacketSource[0]), |
| 108 | CaptureLength: len(ngPacketSource[0]), |
| 109 | InterfaceIndex: 0, |
| 110 | }, |
| 111 | }, |
| 112 | { |
| 113 | data: ngPacketSource[4], |
| 114 | ci: gopacket.CaptureInfo{ |
| 115 | Timestamp: time.Unix(1519128000-800, 195312500).UTC(), |
| 116 | Length: len(ngPacketSource[4]), |
| 117 | CaptureLength: len(ngPacketSource[4]), |
| 118 | InterfaceIndex: 1, |
| 119 | }, |
| 120 | }, |
| 121 | { |
| 122 | data: ngPacketSource[1], |
nothing calls this directly
no test coverage detected
searching dependent graphs…