test1640: initial MQTTS test

This commit is contained in:
Daniel Stenberg 2025-12-15 13:19:19 +01:00
parent 686a301209
commit ae3fe9f6e7
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
2 changed files with 56 additions and 0 deletions

View file

@ -218,6 +218,8 @@ test1620 test1621 \
\
test1630 test1631 test1632 test1633 test1634 test1635 \
\
test1640 \
\
test1650 test1651 test1652 test1653 test1654 test1655 test1656 test1657 \
test1658 \
test1660 test1661 test1662 test1663 test1664 test1665 \

54
tests/data/test1640 Normal file
View file

@ -0,0 +1,54 @@
<?xml version="1.0" encoding="US-ASCII"?>
<testcase>
<info>
<keywords>
MQTT
MQTT SUBSCRIBE
MQTTS
</keywords>
</info>
# Server-side
<reply>
<data nocheck="yes">
hello
</data>
<datacheck hex="yes">
00 04 31 31 39 30 68 65 6c 6c 6f 5b 4c 46 5d 0a
</datacheck>
</reply>
# Client-side
<client>
<features>
mqtts
</features>
<server>
mqtts
</server>
<name>
MQTTS SUBSCRIBE
</name>
<command option="binary-trace">
mqtts://%HOSTIP:%MQTTSPORT/topic --insecure
</command>
</client>
# Verify data after the test has been "shot"
<verify>
# These are hexadecimal protocol dumps from the client
# Strip out the random part of the client id from the CONNECT message
# before comparison
<strippart>
s/^(.* 00044d5154540402003c000c6375726c).*/$1/
</strippart>
<protocol>
client CONNECT 18 00044d5154540402003c000c6375726c
server CONNACK 2 20020000
client SUBSCRIBE a 00010005746f70696300
server SUBACK 3 9003000100
server PUBLISH d 300d0005746f70696368656c6c6f0a
server DISCONNECT 0 e000
</protocol>
</verify>
</testcase>