1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-03 11:02:05 +00:00

nixos: add mumble test

This tests that both the client and server work. With screenshots!

Signed-off-by: Austin Seipp <aseipp@pobox.com>
This commit is contained in:
Austin Seipp 2014-03-31 23:33:46 -05:00
parent f61110d65d
commit 788354cc34
2 changed files with 55 additions and 0 deletions

View file

@ -25,6 +25,7 @@ with import ../lib/testing.nix { inherit system minimal; };
mysql = makeTest (import ./mysql.nix);
mysql_replication = makeTest (import ./mysql-replication.nix);
munin = makeTest (import ./munin.nix);
mumble = makeTest (import ./mumble.nix);
nat = makeTest (import ./nat.nix);
nfs3 = makeTest (import ./nfs.nix { version = 3; });
#nfs4 = makeTest (import ./nfs.nix { version = 4; });

54
nixos/tests/mumble.nix Normal file
View file

@ -0,0 +1,54 @@
{ pkgs, ... }:
let
client = { config, pkgs, ... }: {
imports = [ ./common/x11.nix ];
environment.systemPackages = [ pkgs.mumble ];
};
in
{
nodes = {
server = { config, pkgs, ... }: {
services.murmur.enable = true;
services.murmur.registerName = "NixOS tests";
};
client1 = client;
client2 = client;
};
testScript = ''
startAll;
$server->waitForUnit("murmur.service");
$client1->waitForX;
$client2->waitForX;
$client1->execute("mumble mumble://client1\@server/test &");
$client2->execute("mumble mumble://client2\@server/test &");
$server->sleep(10); # Wait for Mumble UI to pop up
# cancel client audio configuration
$client1->sendKeys("esc");
$client2->sendKeys("esc");
$server->sleep(1);
# cancel client cert configuration
$client1->sendKeys("esc");
$client2->sendKeys("esc");
$server->sleep(1);
# accept server certificate
$client1->sendChars("y");
$client2->sendChars("y");
# Find clients in logs
$server->waitUntilSucceeds("grep -q 'client1' /var/log/murmur/murmurd.log");
$server->waitUntilSucceeds("grep -q 'client2' /var/log/murmur/murmurd.log");
$server->sleep(5); # wait to get screenshot
$client1->screenshot("screen1");
$client2->screenshot("screen2");
'';
}