Keep participant details bound to the selected session and UID
This commit is contained in:
1 parent
0b4a707637
commit
89a2b21746
13 files changed
+443
-94
No files matched your search
@@ -355,6 +355,16 @@ fn status_messages_are_optional_but_must_be_valid_when_present() {
|
||||
core.shutdown();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn client_info_requires_explicit_client_identity() {
|
||||
let dir = TempDir::new("client-info-args"); let mut core = Core::start(&dir.0);
|
||||
for args in [json!({"client_id":0,"uid":"peer="}),json!({"client_id":65536,"uid":"peer="}),json!({"client_id":7}),json!({"client_id":7,"uid":""}),json!({"client_id":7,"uid":"peer=","unknown":true})] {
|
||||
let (reply,_) = core.request("invalid-info","client_info",args); assert_eq!(reply["error"]["code"],"bad_request","{reply}");
|
||||
}
|
||||
let (reply,_) = core.request("offline-info","client_info",json!({"client_id":7,"uid":"peer="}));
|
||||
assert_eq!(reply["error"]["code"],"not_connected","{reply}"); core.shutdown();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn channel_queries_validate_arguments_before_connection_lookup() {
|
||||
let dir = TempDir::new("channel-query-args");
|
||||
|
||||
Reference in new issue
Block a user