2014-04-14 14:02:44 +02:00
|
|
|
import ./make-test.nix (
|
2014-04-01 06:33:46 +02:00
|
|
|
|
|
|
|
let
|
|
|
|
client = { config, pkgs, ... }: {
|
|
|
|
imports = [ ./common/x11.nix ];
|
|
|
|
environment.systemPackages = [ pkgs.mumble ];
|
|
|
|
};
|
|
|
|
in
|
|
|
|
{
|
2014-06-28 16:04:49 +02:00
|
|
|
name = "mumble";
|
|
|
|
|
2014-04-01 06:33:46 +02:00
|
|
|
nodes = {
|
|
|
|
server = { config, pkgs, ... }: {
|
|
|
|
services.murmur.enable = true;
|
|
|
|
services.murmur.registerName = "NixOS tests";
|
2014-04-11 17:15:56 +02:00
|
|
|
networking.firewall.allowedTCPPorts = [ config.services.murmur.port ];
|
2014-04-01 06:33:46 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
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 &");
|
|
|
|
|
2014-05-21 18:07:27 +02:00
|
|
|
$client1->waitForWindow(qr/Mumble/);
|
|
|
|
$client2->waitForWindow(qr/Mumble/);
|
|
|
|
$server->sleep(3); # Wait some more for the Mumble UI
|
2014-04-01 06:33:46 +02:00
|
|
|
|
|
|
|
# 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");
|
|
|
|
'';
|
2014-04-14 14:02:44 +02:00
|
|
|
})
|