2015-07-12 10:09:40 +00:00
|
|
|
import ./make-test.nix ({ pkgs, ...} :
|
2014-04-01 04:33:46 +00:00
|
|
|
|
|
|
|
let
|
2018-07-20 20:56:59 +00:00
|
|
|
client = { pkgs, ... }: {
|
2014-04-01 04:33:46 +00:00
|
|
|
imports = [ ./common/x11.nix ];
|
|
|
|
environment.systemPackages = [ pkgs.mumble ];
|
|
|
|
};
|
|
|
|
in
|
|
|
|
{
|
2014-06-28 14:04:49 +00:00
|
|
|
name = "mumble";
|
2015-07-12 10:09:40 +00:00
|
|
|
meta = with pkgs.stdenv.lib.maintainers; {
|
2019-02-22 15:14:13 +00:00
|
|
|
maintainers = [ thoughtpolice eelco ];
|
2015-07-12 10:09:40 +00:00
|
|
|
};
|
2014-06-28 14:04:49 +00:00
|
|
|
|
2014-04-01 04:33:46 +00:00
|
|
|
nodes = {
|
2018-07-20 20:56:59 +00:00
|
|
|
server = { config, ... }: {
|
2014-04-01 04:33:46 +00:00
|
|
|
services.murmur.enable = true;
|
|
|
|
services.murmur.registerName = "NixOS tests";
|
2014-04-11 15:15:56 +00:00
|
|
|
networking.firewall.allowedTCPPorts = [ config.services.murmur.port ];
|
2014-04-01 04:33:46 +00: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 &");
|
|
|
|
|
|
|
|
# cancel client audio configuration
|
2014-07-02 09:27:21 +00:00
|
|
|
$client1->waitForWindow(qr/Audio Tuning Wizard/);
|
|
|
|
$client2->waitForWindow(qr/Audio Tuning Wizard/);
|
2016-09-12 21:07:48 +00:00
|
|
|
$server->sleep(5); # wait because mumble is slow to register event handlers
|
2014-04-01 04:33:46 +00:00
|
|
|
$client1->sendKeys("esc");
|
|
|
|
$client2->sendKeys("esc");
|
|
|
|
|
|
|
|
# cancel client cert configuration
|
2014-07-02 09:27:21 +00:00
|
|
|
$client1->waitForWindow(qr/Certificate Management/);
|
|
|
|
$client2->waitForWindow(qr/Certificate Management/);
|
2016-09-12 21:07:48 +00:00
|
|
|
$server->sleep(5); # wait because mumble is slow to register event handlers
|
2014-04-01 04:33:46 +00:00
|
|
|
$client1->sendKeys("esc");
|
|
|
|
$client2->sendKeys("esc");
|
|
|
|
|
|
|
|
# accept server certificate
|
2014-07-02 09:27:21 +00:00
|
|
|
$client1->waitForWindow(qr/^Mumble$/);
|
|
|
|
$client2->waitForWindow(qr/^Mumble$/);
|
2016-09-12 21:07:48 +00:00
|
|
|
$server->sleep(5); # wait because mumble is slow to register event handlers
|
|
|
|
$client1->sendChars("y");
|
|
|
|
$client2->sendChars("y");
|
|
|
|
$server->sleep(5); # wait because mumble is slow to register event handlers
|
|
|
|
|
|
|
|
# sometimes the wrong of the 2 windows is focused, we switch focus and try pressing "y" again
|
|
|
|
$client1->sendKeys("alt-tab");
|
|
|
|
$client2->sendKeys("alt-tab");
|
|
|
|
$server->sleep(5); # wait because mumble is slow to register event handlers
|
2014-04-01 04:33:46 +00:00
|
|
|
$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 12:02:44 +00:00
|
|
|
})
|