mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 00:12:56 +00:00
1e8f59b2ee
With the default timeout, this test would time out too early for me and others[1]. [1]: https://github.com/NixOS/nixpkgs/pull/177052#issue-1266336706
23 lines
798 B
Nix
23 lines
798 B
Nix
import ./make-test-python.nix ({ pkgs, lib, ... }: {
|
|
name = "moodle";
|
|
meta.maintainers = [ lib.maintainers.aanderse ];
|
|
|
|
nodes.machine =
|
|
{ ... }:
|
|
{ services.moodle.enable = true;
|
|
services.moodle.virtualHost.hostName = "localhost";
|
|
services.moodle.virtualHost.adminAddr = "root@example.com";
|
|
services.moodle.initialPassword = "correcthorsebatterystaple";
|
|
|
|
# Ensure the virtual machine has enough memory to avoid errors like:
|
|
# Fatal error: Out of memory (allocated 152047616) (tried to allocate 33554440 bytes)
|
|
virtualisation.memorySize = 2000;
|
|
};
|
|
|
|
testScript = ''
|
|
start_all()
|
|
machine.wait_for_unit("phpfpm-moodle.service", timeout=1800)
|
|
machine.wait_until_succeeds("curl http://localhost/ | grep 'You are not logged in'")
|
|
'';
|
|
})
|