Skip to content

Commit a561e05

Browse files
committed
Add mqtt plugin tests
1 parent 8c09c07 commit a561e05

File tree

4 files changed

+19
-2
lines changed

4 files changed

+19
-2
lines changed

pcaps/mqtt.pcap

3.07 KB
Binary file not shown.

tests/functional/Makefile.am

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ TESTS=basic.sh \
1919
wg.sh \
2020
ssadetector.sh \
2121
vlan.sh \
22-
nettisa.sh
22+
nettisa.sh \
23+
mqtt.sh
2324

2425
if WITH_QUIC
2526
TESTS+=\
@@ -50,6 +51,7 @@ EXTRA_DIST=common.sh \
5051
nettisa.sh \
5152
ssadetector.sh \
5253
vlan.sh \
54+
mqtt.sh \
5355
reference/basic \
5456
reference/basicplus \
5557
reference/pstats \
@@ -72,7 +74,8 @@ EXTRA_DIST=common.sh \
7274
reference/quic \
7375
reference/ssadetector \
7476
reference/vlan \
75-
reference/nettisa
77+
reference/nettisa \
78+
reference/mqtt
7679

7780
clean-local:
7881
rm -rf output

tests/functional/mqtt.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/sh
2+
3+
test -z "$srcdir" && export srcdir=.
4+
5+
. $srcdir/common.sh
6+
7+
run_plugin_test mqtt "$pcap_dir/mqtt.pcap"
8+

tests/functional/reference/mqtt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
91.121.93.94,172.28.8.57,205,56,0,2024-07-03T15:15:02.107896,2024-07-03T15:15:02.209210,00:00:00:00:00:00,00:15:5d:a0:07:5d,3,1,1883,60,16398,45601,0,2,0,0,4,6,25,24,""
2+
91.121.93.94,172.28.8.57,216,56,0,2024-07-03T15:15:02.230420,2024-07-03T15:15:02.331357,00:00:00:00:00:00,00:15:5d:a0:07:5d,3,1,1883,666,16399,57281,0,0,0,0,4,6,25,24,""
3+
91.121.93.94,172.28.8.57,263,168,0,2024-07-03T15:15:02.352824,2024-07-03T15:15:02.754817,00:00:00:00:00:00,00:15:5d:a0:07:5d,4,3,1883,60,16622,50195,0,2,0,5,4,6,24,24,""
4+
91.121.93.94,172.28.8.57,274,196,0,2024-07-03T15:15:02.776140,2024-07-03T15:15:03.177116,00:00:00:00:00:00,00:15:5d:a0:07:5d,4,3,1883,60,17166,36367,0,2,0,1,4,6,24,24,""
5+
91.121.93.94,172.28.8.57,82,56,0,2024-07-03T15:15:03.198739,2024-07-03T15:15:03.218922,00:00:00:00:00:00,00:15:5d:a0:07:5d,1,1,1883,60,6,38687,0,194,5,0,4,6,24,24,""
6+
ipaddr DST_IP,ipaddr SRC_IP,uint64 BYTES,uint64 BYTES_REV,uint64 LINK_BIT_FIELD,time TIME_FIRST,time TIME_LAST,macaddr DST_MAC,macaddr SRC_MAC,uint32 PACKETS,uint32 PACKETS_REV,uint16 DST_PORT,uint16 MQTT_KEEP_ALIVE,uint16 MQTT_TYPE_CUMULATIVE,uint16 SRC_PORT,uint8 DIR_BIT_FIELD,uint8 MQTT_CONNECTION_FLAGS,uint8 MQTT_CONNECTION_RETURN_CODE,uint8 MQTT_PUBLISH_FLAGS,uint8 MQTT_VERSION,uint8 PROTOCOL,uint8 TCP_FLAGS,uint8 TCP_FLAGS_REV,string MQTT_TOPICS

0 commit comments

Comments
 (0)