Skip to content
Permalink
Browse files

Merge pull request #74854 from x123/x123-test-xrdp-python

nixos/tests/xrdp: port to python
  • Loading branch information...
flokli committed Dec 2, 2019
2 parents 5ca8364 + 362e377 commit a8508f7266f245756b78557861d315e05625c6b2
Showing with 19 additions and 17 deletions.
  1. +19 −17 nixos/tests/xrdp.nix
@@ -1,4 +1,4 @@
import ./make-test.nix ({ pkgs, ...} : {
import ./make-test-python.nix ({ pkgs, ...} : {
name = "xrdp";
meta = with pkgs.stdenv.lib.maintainers; {
maintainers = [ volth ];
@@ -21,25 +21,27 @@ import ./make-test.nix ({ pkgs, ...} : {
};
};

testScript = { ... }: ''
startAll;
testScript = { nodes, ... }: let
user = nodes.client.config.users.users.alice;
in ''
start_all()
$client->waitForX;
$client->waitForFile("/home/alice/.Xauthority");
$client->succeed("xauth merge ~alice/.Xauthority");
client.wait_for_x()
client.wait_for_file("${user.home}/.Xauthority")
client.succeed("xauth merge ${user.home}/.Xauthority")
$client->sleep(5);
client.sleep(5)
$client->execute("xterm &");
$client->sleep(1);
$client->sendChars("xfreerdp /cert-tofu /w:640 /h:480 /v:127.0.0.1 /u:alice /p:foobar\n");
$client->sleep(5);
$client->screenshot("localrdp");
client.execute("xterm &")
client.sleep(1)
client.send_chars("xfreerdp /cert-tofu /w:640 /h:480 /v:127.0.0.1 /u:${user.name} /p:${user.password}\n")
client.sleep(5)
client.screenshot("localrdp")
$client->execute("xterm &");
$client->sleep(1);
$client->sendChars("xfreerdp /cert-tofu /w:640 /h:480 /v:server /u:alice /p:foobar\n");
$client->sleep(5);
$client->screenshot("remoterdp");
client.execute("xterm &")
client.sleep(1)
client.send_chars("xfreerdp /cert-tofu /w:640 /h:480 /v:server /u:${user.name} /p:${user.password}\n")
client.sleep(5)
client.screenshot("remoterdp")
'';
})

0 comments on commit a8508f7

Please sign in to comment.
You can’t perform that action at this time.