xf.li | 6c8fc1e | 2023-08-12 00:11:09 -0700 | [diff] [blame^] | 1 | <testcase> |
| 2 | <info> |
| 3 | <keywords> |
| 4 | MQTT |
| 5 | MQTT PUBLISH |
| 6 | </keywords> |
| 7 | </info> |
| 8 | |
| 9 | # |
| 10 | # Server-side |
| 11 | <reply> |
| 12 | <data> |
| 13 | </data> |
| 14 | </reply> |
| 15 | |
| 16 | # |
| 17 | # Client-side |
| 18 | <client> |
| 19 | <features> |
| 20 | mqtt |
| 21 | </features> |
| 22 | <server> |
| 23 | mqtt |
| 24 | </server> |
| 25 | <name> |
| 26 | MQTT PUBLISH with user and password valid |
| 27 | </name> |
| 28 | <command option="binary-trace"> |
| 29 | mqtt://%HOSTIP:%MQTTPORT/%TESTNUMBER -d something -u testuser:testpasswd |
| 30 | </command> |
| 31 | </client> |
| 32 | |
| 33 | # |
| 34 | # Verify data after the test has been "shot" |
| 35 | <verify> |
| 36 | # These are hexadecimal protocol dumps from the client |
| 37 | # |
| 38 | # Strip out the random part of the client id from the CONNECT message |
| 39 | # before comparison |
| 40 | <strippart> |
| 41 | s/^(.* 00044d51545404c2003c000c6375726c).*/$1/ |
| 42 | </strippart> |
| 43 | <protocol> |
| 44 | client CONNECT 2e 00044d51545404c2003c000c6375726c |
| 45 | server CONNACK 2 20020000 |
| 46 | client PUBLISH f 000432323031736f6d657468696e67 |
| 47 | client DISCONNECT 0 e000 |
| 48 | </protocol> |
| 49 | </verify> |
| 50 | </testcase> |