Test: Add wslua.
[metze/wireshark/wip.git] / test / suite_dissection.py
1 #
2 # -*- coding: utf-8 -*-
3 # Wireshark tests
4 # By Gerald Combs <gerald@wireshark.org>
5 #
6 # Ported from a set of Bash scripts which were copyright 2005 Ulf Lamping
7 #
8 # SPDX-License-Identifier: GPL-2.0-or-later
9 #
10 '''Dissection tests'''
11
12 import config
13 import os.path
14 import subprocesstest
15 import unittest
16
17 class case_dissect_http2(subprocesstest.SubprocessTestCase):
18     def test_http2_data_reassembly(self):
19         '''HTTP2 data reassembly'''
20         if not config.have_nghttp2:
21             self.skipTest('Requires nghttp2.')
22         capture_file = os.path.join(config.capture_dir, 'http2-data-reassembly.pcap')
23         key_file = os.path.join(config.key_dir, 'http2-data-reassembly.keys')
24         self.runProcess((config.cmd_tshark,
25                 '-r', capture_file,
26                 '-o', 'ssl.keylog_file: {}'.format(key_file),
27                 '-d', 'tcp.port==8443,ssl',
28                 '-Y', 'http2.data.data matches "PNG" && http2.data.data matches "END"',
29             ),
30             env=config.test_env)
31         self.assertTrue(self.grepOutput('DATA'))