From 611eae17c80999c00587fe5ee297a7247fbe8335 Mon Sep 17 00:00:00 2001 From: Kevin Albertson Date: Fri, 23 Dec 2022 20:50:03 -0500 Subject: add mongo zstd test to suite_dissection.py --- test/captures/mongo-zstd.pcapng | Bin 0 -> 568 bytes test/suite_dissection.py | 12 ++++++++++++ 2 files changed, 12 insertions(+) create mode 100644 test/captures/mongo-zstd.pcapng diff --git a/test/captures/mongo-zstd.pcapng b/test/captures/mongo-zstd.pcapng new file mode 100644 index 0000000000..565815ff78 Binary files /dev/null and b/test/captures/mongo-zstd.pcapng differ diff --git a/test/suite_dissection.py b/test/suite_dissection.py index 5ef2defead..8272a7274a 100644 --- a/test/suite_dissection.py +++ b/test/suite_dissection.py @@ -823,3 +823,15 @@ class case_communityid(subprocesstest.SubprocessTestCase): )) self.assertBaseline(dirs, proc.stdout_str, 'communityid-filtered.txt') + +@fixtures.mark_usefixtures('test_env') +@fixtures.uses_fixtures +class case_decompress_mongo(subprocesstest.SubprocessTestCase): + def test_decompress_zstd(self, cmd_tshark, capture_file): + proc = self.assertRun((cmd_tshark, + '-d', 'tcp.port==27017,mongo', + '-r', capture_file('mongo-zstd.pcapng'), + '-Tfields', '-emongo.element.name' + )) + # Check the element names of the decompressed body. + self.assertEqual('drop,lsid,id,$db', proc.stdout_str.strip()) -- cgit v1.2.3