diff options
author | Emiliano Ciavatta | 2020-09-04 21:43:28 +0000 |
---|---|---|
committer | Emiliano Ciavatta | 2020-09-04 21:43:28 +0000 |
commit | fedef499a96a560c0144868e50d20cc7fc3aa549 (patch) | |
tree | 8e6814b5ef0ebbb4c86b4764666a3d458fbbcecb | |
parent | 0bbd12cd1f5223626ee1df4872e8337153093f2f (diff) |
Fix pcap importer tests
-rw-r--r-- | pcap_importer_test.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pcap_importer_test.go b/pcap_importer_test.go index 74dd2cc..be09ea9 100644 --- a/pcap_importer_test.go +++ b/pcap_importer_test.go @@ -21,11 +21,11 @@ func TestImportPcap(t *testing.T) { pcapImporter.releaseAssembler(pcapImporter.takeAssembler()) fileName := copyToProcessing(t, "ping_pong_10000.pcap") - sessionID, err := pcapImporter.ImportPcap(fileName) + sessionID, err := pcapImporter.ImportPcap(fileName, false) require.NoError(t, err) duplicatePcapFileName := copyToProcessing(t, "ping_pong_10000.pcap") - duplicateSessionID, err := pcapImporter.ImportPcap(duplicatePcapFileName) + duplicateSessionID, err := pcapImporter.ImportPcap(duplicatePcapFileName, false) require.Error(t, err) assert.Equal(t, sessionID, duplicateSessionID) assert.Error(t, os.Remove(ProcessingPcapsBasePath + duplicatePcapFileName)) @@ -52,7 +52,7 @@ func TestCancelImportSession(t *testing.T) { pcapImporter := newTestPcapImporter(wrapper, "172.17.0.3") fileName := copyToProcessing(t, "ping_pong_10000.pcap") - sessionID, err := pcapImporter.ImportPcap(fileName) + sessionID, err := pcapImporter.ImportPcap(fileName, false) require.NoError(t, err) assert.False(t, pcapImporter.CancelSession("invalid")) @@ -79,7 +79,7 @@ func TestImportNoTcpPackets(t *testing.T) { pcapImporter := newTestPcapImporter(wrapper, "172.17.0.4") fileName := copyToProcessing(t, "icmp.pcap") - sessionID, err := pcapImporter.ImportPcap(fileName) + sessionID, err := pcapImporter.ImportPcap(fileName, false) require.NoError(t, err) session := waitSessionCompletion(t, pcapImporter, sessionID) |