test the invite room check and the no-homeserver sweep, drop the last space wording
This commit is contained in:
parent
fd01848d4d
commit
ae9c3444bc
3 changed files with 25 additions and 3 deletions
|
|
@ -460,4 +460,27 @@ mod tests {
|
|||
assert!(!message.contains("free-form-marker"), "{message}");
|
||||
}
|
||||
}
|
||||
|
||||
/// A room that is neither an id nor an alias is refused before any
|
||||
/// request is made; with no default Space left, there is nothing to fall
|
||||
/// back to.
|
||||
#[tokio::test]
|
||||
async fn invite_user_refuses_a_room_that_is_neither_an_id_nor_an_alias() {
|
||||
let client = swarm_matrix_client::client().expect("client");
|
||||
let err = invite_user(&client, "tok", "mara", "general", "example.org")
|
||||
.await
|
||||
.expect_err("a bare name is not a room");
|
||||
assert!(
|
||||
format!("{err:#}").contains("neither a room id nor an alias"),
|
||||
"{err:#}"
|
||||
);
|
||||
}
|
||||
|
||||
/// The sweep touches nothing, and reports success, on a hive with no
|
||||
/// homeserver configured (the test environment has none).
|
||||
#[tokio::test]
|
||||
async fn the_sweep_is_a_successful_no_op_without_a_homeserver() {
|
||||
assert!(!is_present());
|
||||
assert!(ensure_all().await);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -170,7 +170,7 @@ in
|
|||
}
|
||||
// lib.optionalAttrs (config.services.hyperhive.swarm.matrix.apiUrl != null) {
|
||||
# Client-server API base hive-c0re uses to provision matrix (register
|
||||
# agent users, create the hive space, invite members).
|
||||
# agent users, invite members).
|
||||
# Supplied by `services.hyperhive.swarm.matrix.apiUrl`, which defaults to
|
||||
# the same gateway vhost as HIVE_MATRIX_URL above, over https because it
|
||||
# carries the hive's matrix token and may cross the network. Its own
|
||||
|
|
|
|||
|
|
@ -59,8 +59,7 @@ in
|
|||
example = "https://matrix.example.com";
|
||||
description = ''
|
||||
Client-server API base URL **hive-c0re itself** uses to
|
||||
provision matrix (register agent users, create the hive space,
|
||||
invite members). Distinct from the agent-facing
|
||||
provision matrix (register agent users, invite members). Distinct from the agent-facing
|
||||
`services.hyperhive.agent.matrix.url`, which is the gateway vhost handed to
|
||||
each agent's `hive-matrix-daemon`.
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue