aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorKevin Albertson <kevin.eric.albertson@gmail.com>2022-12-23 20:50:03 -0500
committerAlexis La Goutte <alexis.lagoutte@gmail.com>2022-12-28 05:00:45 +0000
commit611eae17c80999c00587fe5ee297a7247fbe8335 (patch)
tree586fe5888acd7922611854d498ef7ab453e02e80 /test
parenteca4655a48ece3072ebbefb50011ed8df1356225 (diff)
add mongo zstd test to suite_dissection.py
Diffstat (limited to 'test')
-rw-r--r--test/captures/mongo-zstd.pcapngbin0 -> 568 bytes
-rw-r--r--test/suite_dissection.py12
2 files changed, 12 insertions, 0 deletions
diff --git a/test/captures/mongo-zstd.pcapng b/test/captures/mongo-zstd.pcapng
new file mode 100644
index 0000000000..565815ff78
--- /dev/null
+++ b/test/captures/mongo-zstd.pcapng
Binary files 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())