minecraft: Add test
This commit is contained in:
parent
eb2a3a040c
commit
0dc74a15ad
|
@ -208,6 +208,7 @@ in
|
||||||
mediawiki = handleTest ./mediawiki.nix {};
|
mediawiki = handleTest ./mediawiki.nix {};
|
||||||
memcached = handleTest ./memcached.nix {};
|
memcached = handleTest ./memcached.nix {};
|
||||||
metabase = handleTest ./metabase.nix {};
|
metabase = handleTest ./metabase.nix {};
|
||||||
|
minecraft = handleTest ./minecraft.nix {};
|
||||||
miniflux = handleTest ./miniflux.nix {};
|
miniflux = handleTest ./miniflux.nix {};
|
||||||
minio = handleTest ./minio.nix {};
|
minio = handleTest ./minio.nix {};
|
||||||
minidlna = handleTest ./minidlna.nix {};
|
minidlna = handleTest ./minidlna.nix {};
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
import ./make-test-python.nix ({ pkgs, lib, ... }: {
|
||||||
|
name = "minecraft";
|
||||||
|
meta = with lib.maintainers; { maintainers = [ nequissimus ]; };
|
||||||
|
|
||||||
|
nodes.client = { nodes, ... }:
|
||||||
|
let user = nodes.client.config.users.users.alice;
|
||||||
|
in {
|
||||||
|
imports = [ ./common/user-account.nix ./common/x11.nix ];
|
||||||
|
|
||||||
|
environment.systemPackages = [ pkgs.minecraft ];
|
||||||
|
|
||||||
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
|
test-support.displayManager.auto.user = user.name;
|
||||||
|
};
|
||||||
|
|
||||||
|
enableOCR = true;
|
||||||
|
|
||||||
|
testScript = { nodes, ... }:
|
||||||
|
let user = nodes.client.config.users.users.alice;
|
||||||
|
in ''
|
||||||
|
client.wait_for_x()
|
||||||
|
client.execute("su - alice -c minecraft-launcher &")
|
||||||
|
client.wait_for_text("CONTINUE WITHOUT LOGIN")
|
||||||
|
client.sleep(10)
|
||||||
|
client.screenshot("launcher")
|
||||||
|
'';
|
||||||
|
})
|
|
@ -1,5 +1,6 @@
|
||||||
{ stdenv
|
{ stdenv
|
||||||
, fetchurl
|
, fetchurl
|
||||||
|
, nixosTests
|
||||||
, makeDesktopItem
|
, makeDesktopItem
|
||||||
, makeWrapper
|
, makeWrapper
|
||||||
, wrapGAppsHook
|
, wrapGAppsHook
|
||||||
|
@ -147,5 +148,8 @@ stdenv.mkDerivation rec {
|
||||||
platforms = [ "x86_64-linux" ];
|
platforms = [ "x86_64-linux" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
passthru.updateScript = ./update.sh;
|
passthru = {
|
||||||
|
tests = { inherit (nixosTests) minecraft; };
|
||||||
|
updateScript = ./update.sh;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue