xf.li | 6c8fc1e | 2023-08-12 00:11:09 -0700 | [diff] [blame^] | 1 | <testcase> |
| 2 | <info> |
| 3 | <keywords> |
| 4 | MQTT |
| 5 | MQTT SUBSCRIBE |
| 6 | </keywords> |
| 7 | </info> |
| 8 | |
| 9 | # |
| 10 | # Server-side |
| 11 | <reply> |
| 12 | <data nocheck="yes"> |
| 13 | hello |
| 14 | </data> |
| 15 | <datacheck hex="yes"> |
| 16 | 00 04 31 31 39 30 68 65 6c 6c 6f 5b 4c 46 5d 0a |
| 17 | </datacheck> |
| 18 | </reply> |
| 19 | |
| 20 | # |
| 21 | # Client-side |
| 22 | <client> |
| 23 | <features> |
| 24 | mqtt |
| 25 | </features> |
| 26 | <server> |
| 27 | mqtt |
| 28 | </server> |
| 29 | <name> |
| 30 | MQTT PUBLISH empty payload, single space topic |
| 31 | </name> |
| 32 | <command option="binary-trace"> |
| 33 | mqtt://%HOSTIP:%MQTTPORT/%20 -d "" |
| 34 | </command> |
| 35 | </client> |
| 36 | |
| 37 | # |
| 38 | # Verify data after the test has been "shot" |
| 39 | <verify> |
| 40 | # These are hexadecimal protocol dumps from the client |
| 41 | # |
| 42 | # Strip out the random part of the client id from the CONNECT message |
| 43 | # before comparison |
| 44 | <strippart> |
| 45 | s/^(.* 00044d5154540402003c000c6375726c).*/$1/ |
| 46 | </strippart> |
| 47 | <protocol> |
| 48 | client CONNECT 18 00044d5154540402003c000c6375726c |
| 49 | server CONNACK 2 20020000 |
| 50 | client PUBLISH 3 000120 |
| 51 | client DISCONNECT 0 e000 |
| 52 | </protocol> |
| 53 | </verify> |
| 54 | </testcase> |