teleport
teleport copied to clipboard
Initial RDPDR tests
This PR is large, in part because it's a refactor of a stack of previous PR's (which have now been closed) which I decided aren't worth merging individually, because the tests they contained have been changed so significantly here (see my come to Jesus moment in the description for https://github.com/gravitational/teleport/pull/16458).
Although it may look daunting, a lot of the changes come from the type aliasing of a couple of common structures, and the inclusion of a new trait Encode
https://github.com/gravitational/teleport/blob/7197fcb61f37054f1320ead9702ef278b6bf3830/lib/srv/desktop/rdp/rdpclient/src/lib.rs#L1879-L1887
None of the changes here change the underlying decoding/encoding of the bytes being sent over RDP. Most changes are just re-shufflings necessary to write a comprehensible test suite (like taking an existing encode
function and making it part of trait Encode
). For any struct where a new encode
has been defined, it's encode
is only called from the test suite itself.