diff options
author | worldofpeace <worldofpeace@protonmail.ch> | 2019-11-24 13:13:36 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-24 13:13:36 +0000 |
commit | 16296a571f84c82dac9b21f6da9dc808e7adfeb3 (patch) | |
tree | ee7d66c7780bf7d27525dafc2c8df83e2507d33b /nixos | |
parent | 2dfa46efa1f9869aea98612efbd93d1181e9f080 (diff) | |
parent | 433972d65b61105abc0f57037fac58676ff986b1 (diff) | |
download | nixlib-16296a571f84c82dac9b21f6da9dc808e7adfeb3.tar nixlib-16296a571f84c82dac9b21f6da9dc808e7adfeb3.tar.gz nixlib-16296a571f84c82dac9b21f6da9dc808e7adfeb3.tar.bz2 nixlib-16296a571f84c82dac9b21f6da9dc808e7adfeb3.tar.lz nixlib-16296a571f84c82dac9b21f6da9dc808e7adfeb3.tar.xz nixlib-16296a571f84c82dac9b21f6da9dc808e7adfeb3.tar.zst nixlib-16296a571f84c82dac9b21f6da9dc808e7adfeb3.zip |
Merge pull request #74031 from mayflower/prosody-tests-python
nixosTests.prosody*: port to python
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/tests/xmpp/prosody-mysql.nix | 20 | ||||
-rw-r--r-- | nixos/tests/xmpp/prosody.nix | 20 |
2 files changed, 20 insertions, 20 deletions
diff --git a/nixos/tests/xmpp/prosody-mysql.nix b/nixos/tests/xmpp/prosody-mysql.nix index 62b4a17421e5..0507227021b2 100644 --- a/nixos/tests/xmpp/prosody-mysql.nix +++ b/nixos/tests/xmpp/prosody-mysql.nix @@ -1,4 +1,4 @@ -import ../make-test.nix { +import ../make-test-python.nix { name = "prosody-mysql"; nodes = { @@ -57,21 +57,21 @@ import ../make-test.nix { }; testScript = { nodes, ... }: '' - $mysql->waitForUnit('mysql.service'); - $server->waitForUnit('prosody.service'); - $server->succeed('prosodyctl status') =~ /Prosody is running/; + mysql.wait_for_unit("mysql.service") + server.wait_for_unit("prosody.service") + server.succeed('prosodyctl status | grep "Prosody is running"') # set password to 'nothunter2' (it's asked twice) - $server->succeed('yes nothunter2 | prosodyctl adduser cthon98@example.com'); + server.succeed("yes nothunter2 | prosodyctl adduser cthon98@example.com") # set password to 'y' - $server->succeed('yes | prosodyctl adduser azurediamond@example.com'); + server.succeed("yes | prosodyctl adduser azurediamond@example.com") # correct password to 'hunter2' - $server->succeed('yes hunter2 | prosodyctl passwd azurediamond@example.com'); + server.succeed("yes hunter2 | prosodyctl passwd azurediamond@example.com") - $client->succeed("send-message"); + client.succeed("send-message") - $server->succeed('prosodyctl deluser cthon98@example.com'); - $server->succeed('prosodyctl deluser azurediamond@example.com'); + server.succeed("prosodyctl deluser cthon98@example.com") + server.succeed("prosodyctl deluser azurediamond@example.com") ''; } diff --git a/nixos/tests/xmpp/prosody.nix b/nixos/tests/xmpp/prosody.nix index 8331c7b6d331..9d1374bff6bd 100644 --- a/nixos/tests/xmpp/prosody.nix +++ b/nixos/tests/xmpp/prosody.nix @@ -1,4 +1,4 @@ -import ../make-test.nix { +import ../make-test-python.nix { name = "prosody"; nodes = { @@ -28,19 +28,19 @@ import ../make-test.nix { }; testScript = { nodes, ... }: '' - $server->waitForUnit('prosody.service'); - $server->succeed('prosodyctl status') =~ /Prosody is running/; + server.wait_for_unit("prosody.service") + server.succeed('prosodyctl status | grep "Prosody is running"') # set password to 'nothunter2' (it's asked twice) - $server->succeed('yes nothunter2 | prosodyctl adduser cthon98@example.com'); + server.succeed("yes nothunter2 | prosodyctl adduser cthon98@example.com") # set password to 'y' - $server->succeed('yes | prosodyctl adduser azurediamond@example.com'); - # correct password to 'hunter2' - $server->succeed('yes hunter2 | prosodyctl passwd azurediamond@example.com'); + server.succeed("yes | prosodyctl adduser azurediamond@example.com") + # correct password to "hunter2" + server.succeed("yes hunter2 | prosodyctl passwd azurediamond@example.com") - $client->succeed("send-message"); + client.succeed("send-message") - $server->succeed('prosodyctl deluser cthon98@example.com'); - $server->succeed('prosodyctl deluser azurediamond@example.com'); + server.succeed("prosodyctl deluser cthon98@example.com") + server.succeed("prosodyctl deluser azurediamond@example.com") ''; } |