mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 23:13:19 +00:00
minecraft: Add test
This commit is contained in:
parent
eb2a3a040c
commit
0dc74a15ad
@ -208,6 +208,7 @@ in
|
||||
mediawiki = handleTest ./mediawiki.nix {};
|
||||
memcached = handleTest ./memcached.nix {};
|
||||
metabase = handleTest ./metabase.nix {};
|
||||
minecraft = handleTest ./minecraft.nix {};
|
||||
miniflux = handleTest ./miniflux.nix {};
|
||||
minio = handleTest ./minio.nix {};
|
||||
minidlna = handleTest ./minidlna.nix {};
|
||||
|
28
nixos/tests/minecraft.nix
Normal file
28
nixos/tests/minecraft.nix
Normal file
@ -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
|
||||
, fetchurl
|
||||
, nixosTests
|
||||
, makeDesktopItem
|
||||
, makeWrapper
|
||||
, wrapGAppsHook
|
||||
@ -147,5 +148,8 @@ stdenv.mkDerivation rec {
|
||||
platforms = [ "x86_64-linux" ];
|
||||
};
|
||||
|
||||
passthru.updateScript = ./update.sh;
|
||||
passthru = {
|
||||
tests = { inherit (nixosTests) minecraft; };
|
||||
updateScript = ./update.sh;
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user