From 54ae8d9774d6f76863d99ce8376f1b6b755ab696 Mon Sep 17 00:00:00 2001 From: Mike English Date: Sun, 3 Nov 2024 18:00:48 -0500 Subject: [PATCH] moq-transport: Update SETUP message tests --- moq-transport/src/setup/client.rs | 4 ++-- moq-transport/src/setup/server.rs | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/moq-transport/src/setup/client.rs b/moq-transport/src/setup/client.rs index 58c1d5e..599ca78 100644 --- a/moq-transport/src/setup/client.rs +++ b/moq-transport/src/setup/client.rs @@ -79,7 +79,7 @@ mod tests { fn encode_decode() { let mut buf = BytesMut::new(); let client = Client { - versions: [Version::DRAFT_03].into(), + versions: [Version::DRAFT_06].into(), role: Role::Both, params: Params::default(), }; @@ -87,7 +87,7 @@ mod tests { client.encode(&mut buf).unwrap(); assert_eq!( buf.to_vec(), - vec![0x40, 0x40, 0x01, 0xC0, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x03, 0x01, 0x00, 0x01, 0x03] + vec![0x40, 0x40, 0x0D, 0x01, 0xC0, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x06, 0x01, 0x00, 0x01, 0x03] ); let decoded = Client::decode(&mut buf).unwrap(); diff --git a/moq-transport/src/setup/server.rs b/moq-transport/src/setup/server.rs index aaeb55d..9da881c 100644 --- a/moq-transport/src/setup/server.rs +++ b/moq-transport/src/setup/server.rs @@ -74,12 +74,11 @@ mod tests { use crate::setup::Role; use bytes::BytesMut; - // TODO: Update this test to use the draft 06 version #[test] fn encode_decode() { let mut buf = BytesMut::new(); let client = Server { - version: Version::DRAFT_03, + version: Version::DRAFT_06, role: Role::Both, params: Params::default(), }; @@ -87,7 +86,7 @@ mod tests { client.encode(&mut buf).unwrap(); assert_eq!( buf.to_vec(), - vec![0x40, 0x41, 0xC0, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x03, 0x01, 0x00, 0x01, 0x03] + vec![0x40, 0x41, 0x0C, 0xC0, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x06, 0x01, 0x00, 0x01, 0x03] ); let decoded = Server::decode(&mut buf).unwrap();