From fedef499a96a560c0144868e50d20cc7fc3aa549 Mon Sep 17 00:00:00 2001 From: Emiliano Ciavatta Date: Fri, 4 Sep 2020 23:43:28 +0200 Subject: Fix pcap importer tests --- pcap_importer_test.go | 8 ++++---- 1 file 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) -- cgit v1.2.3-70-g09d2