1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-29 09:02:46 +00:00
nixpkgs/nixos/tests/moodle.nix

23 lines
764 B
Nix
Raw Normal View History

2019-06-21 15:09:15 +01:00
import ./make-test.nix ({ pkgs, lib, ... }: {
name = "moodle";
meta.maintainers = [ lib.maintainers.aanderse ];
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 = ''
startAll;
$machine->waitForUnit('phpfpm-moodle.service');
$machine->succeed('curl http://localhost/') =~ /You are not logged in/ or die;
'';
})