Remove Auth and AuthResponse protobuf messages

This commit is contained in:
Max Brunsfeld
2021-08-19 18:00:12 -07:00
parent a4882169c2
commit 467512eedd
3 changed files with 27 additions and 50 deletions
+1 -7
View File
@@ -514,13 +514,7 @@ mod tests {
smol::spawn(async move { incoming.next().await }).detach();
let err = client
.request(
connection_id,
proto::Auth {
user_id: 42,
access_token: "token".to_string(),
},
)
.request(connection_id, proto::Ping { id: 42 })
.await
.unwrap_err();
assert_eq!(err.to_string(), "connection was closed");
+3 -9
View File
@@ -126,8 +126,6 @@ macro_rules! entity_messages {
messages!(
AddPeer,
Auth,
AuthResponse,
BufferSaved,
ChannelMessageSent,
CloseBuffer,
@@ -148,6 +146,7 @@ messages!(
RemovePeer,
SaveBuffer,
SendChannelMessage,
SendChannelMessageResponse,
ShareWorktree,
ShareWorktreeResponse,
UpdateBuffer,
@@ -155,7 +154,6 @@ messages!(
);
request_messages!(
(Auth, AuthResponse),
(GetChannels, GetChannelsResponse),
(GetUsers, GetUsersResponse),
(JoinChannel, JoinChannelResponse),
@@ -164,6 +162,7 @@ request_messages!(
(Ping, Pong),
(SaveBuffer, BufferSaved),
(ShareWorktree, ShareWorktreeResponse),
(SendChannelMessage, SendChannelMessageResponse),
);
entity_messages!(
@@ -259,12 +258,7 @@ mod tests {
fn test_round_trip_message() {
smol::block_on(async {
let stream = test::Channel::new();
let message1 = Auth {
user_id: 5,
access_token: "the-access-token".into(),
}
.into_envelope(3, None, None);
let message1 = Ping { id: 5 }.into_envelope(3, None, None);
let message2 = OpenBuffer {
worktree_id: 0,
path: "some/path".to_string(),