about summary refs log tree commit diff
path: root/tvix/nix-compat
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2024-04-08T14·40+0300
committerclbot <clbot@tvl.fyi>2024-04-08T16·26+0000
commit35d70f94b7363cb1c85fe887233befe4c3fe0dd7 (patch)
tree7bc0a15dc2b423db233ec4edbd143655a684c451 /tvix/nix-compat
parent9825404388d077f28d5a3d1fd7dca4281492562b (diff)
fix(tvix/nix-compat/wire): fix BytesWriter test payloads r/7877
We actually did construct other payload sizes than the test function was
intended to, because I'm too stupid to count. Fix that, and also update
a leftover _debug in a test name.

Change-Id: I1bff8551f2078afe82f789646b851f2fcff3e82c
Reviewed-on: https://cl.tvl.fyi/c/depot/+/11381
Reviewed-by: picnoir picnoir <picnoir@alternativebit.fr>
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/nix-compat')
-rw-r--r--tvix/nix-compat/src/wire/bytes_writer.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/tvix/nix-compat/src/wire/bytes_writer.rs b/tvix/nix-compat/src/wire/bytes_writer.rs
index 15cac91401c5..6affc092cc83 100644
--- a/tvix/nix-compat/src/wire/bytes_writer.rs
+++ b/tvix/nix-compat/src/wire/bytes_writer.rs
@@ -308,7 +308,7 @@ mod tests {
     /// Write a 8 bytes payload (no padding)
     #[tokio::test]
     async fn write_8b() {
-        let payload = &hex!("000102030405060708");
+        let payload = &hex!("0001020304050607");
 
         let mut mock = Builder::new()
             .write(&produce_exp_bytes(payload).await)
@@ -322,7 +322,7 @@ mod tests {
     /// Write a 9 bytes payload (7 bytes padding)
     #[tokio::test]
     async fn write_9b() {
-        let payload = &hex!("00010203040506070809");
+        let payload = &hex!("000102030405060708");
 
         let mut mock = Builder::new()
             .write(&produce_exp_bytes(payload).await)
@@ -337,7 +337,7 @@ mod tests {
     /// and a shutdown at the end.
     #[tokio::test]
     async fn write_9b_flush() {
-        let payload = &hex!("00010203040506070809");
+        let payload = &hex!("000102030405060708");
         let exp_bytes = produce_exp_bytes(payload).await;
 
         let mut mock = Builder::new().write(&exp_bytes).build();
@@ -359,7 +359,7 @@ mod tests {
 
     /// Write a larger bytes packet
     #[tokio::test]
-    async fn write_1m_debug() {
+    async fn write_1m() {
         let payload = LARGE_PAYLOAD.as_slice();
         let exp_bytes = produce_exp_bytes(payload).await;