Skip to content

Commit 0dcc247

Browse files
bartoostveengithub-actions[bot]
authored andcommitted
nixos/tests/matrix-continuwuity: adapt to new oobe
The new out-of-box experience in continuwuity is such that you have to either create a first (admin) user manually using `conduit --execute "users create <name>"`, or using the temporary registration token that appears in the logs. This needs to happen regardless of whether the server is open to registration or if there is a pre-shared registration token. This commit makes it so that the initial `alice` user is created in advance by the server itself. This does not influence the quality of the nixos test in my opinion. (cherry picked from commit 1c2761e)
1 parent 691d3ba commit 0dcc247

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

nixos/tests/matrix/continuwuity.nix

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
{ lib, ... }:
22
let
33
name = "continuwuity";
4+
user = "alice";
5+
pass = "my-secret-password";
46
in
57
{
68
inherit name;
@@ -12,8 +14,7 @@ in
1214
settings.global = {
1315
server_name = name;
1416
address = [ "0.0.0.0" ];
15-
allow_registration = true;
16-
yes_i_am_very_very_sure_i_want_an_open_registration_server_prone_to_abuse = true;
17+
admin_execute = [ "users create ${user} ${pass}" ];
1718
};
1819
extraEnvironment.RUST_BACKTRACE = "yes";
1920
};
@@ -30,13 +31,10 @@ in
3031
3132
async def main() -> None:
3233
# Connect to continuwuity
33-
client = nio.AsyncClient("http://continuwuity:6167", "alice")
34-
35-
# Register as user alice
36-
response = await client.register("alice", "my-secret-password")
34+
client = nio.AsyncClient("http://continuwuity:6167", "${user}")
3735
3836
# Log in as user alice
39-
response = await client.login("my-secret-password")
37+
response = await client.login("${pass}")
4038
4139
# Create a new room
4240
response = await client.room_create(federate=False)

0 commit comments

Comments
 (0)