diff options
author | Tim Steinbach <tim@nequissimus.com> | 2020-11-28 12:42:10 -0500 |
---|---|---|
committer | Tim Steinbach <tim@nequissimus.com> | 2020-11-28 12:43:17 -0500 |
commit | 0dc74a15ad55f0882895319eb16b0aa9a9f4f82d (patch) | |
tree | af5c1dd2fa3a9ef05c1864bf65aa828410b9ee9e /nixos | |
parent | eb2a3a040cefc6649a117925832b23059fc79b7c (diff) | |
download | nixpkgs-0dc74a15ad55f0882895319eb16b0aa9a9f4f82d.tar nixpkgs-0dc74a15ad55f0882895319eb16b0aa9a9f4f82d.tar.gz nixpkgs-0dc74a15ad55f0882895319eb16b0aa9a9f4f82d.tar.bz2 nixpkgs-0dc74a15ad55f0882895319eb16b0aa9a9f4f82d.tar.lz nixpkgs-0dc74a15ad55f0882895319eb16b0aa9a9f4f82d.tar.xz nixpkgs-0dc74a15ad55f0882895319eb16b0aa9a9f4f82d.tar.zst nixpkgs-0dc74a15ad55f0882895319eb16b0aa9a9f4f82d.zip |
minecraft: Add test
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/tests/all-tests.nix | 1 | ||||
-rw-r--r-- | nixos/tests/minecraft.nix | 28 |
2 files changed, 29 insertions, 0 deletions
diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 771ee9bdbd3..f6c0c248392 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -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 {}; diff --git a/nixos/tests/minecraft.nix b/nixos/tests/minecraft.nix new file mode 100644 index 00000000000..e0c35f2d276 --- /dev/null +++ b/nixos/tests/minecraft.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") + ''; +}) |