(Un)subscribe validates the number of topics and reason codes

Test Plan:
related to T12015
- (un)subscribe reason codes will always contain as many reason codes as there are topic filters
- if, by some odd chance, the client receives the wrong number of rcs or some are invalid, it will treat it as malformed
- both subscribe_op and unsubscribe_op should be 100% covered by tests now

Reviewers: ivica

Reviewed By: ivica

Subscribers: miljen, iljazovic

Differential Revision: https://repo.mireo.local/D27592
This commit is contained in:
Korina Šimičević committed 2024-01-30 15:25:58 +01:00
1 parent 4bf59cc18c
commit d6c4884d53
10 files changed
+405 -81

No files matched your search

+5
View File
@@ -361,6 +361,11 @@ std::vector<std::string> to_readable_packets(const ConstBufferSequence& buffers)
return content;
}
inline disconnect_props dprops_with_reason_string(const std::string& reason_string) {
disconnect_props dprops;
dprops[prop::reason_string] = reason_string;
return dprops;
}
} // end namespace async_mqtt5::test