0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-13 13:40:28 +03:00

Merge pull request #63634 from aanderse/moodle

moodle: init at 3.7.1
This commit is contained in:
Aaron Andersen 2019-08-26 21:12:44 -04:00 committed by GitHub
commit 87fdc06a97
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 366 additions and 0 deletions

View file

@ -161,6 +161,7 @@ in
minio = handleTest ./minio.nix {};
misc = handleTest ./misc.nix {};
mongodb = handleTest ./mongodb.nix {};
moodle = handleTest ./moodle.nix {};
morty = handleTest ./morty.nix {};
mosquitto = handleTest ./mosquitto.nix {};
mpd = handleTest ./mpd.nix {};

22
nixos/tests/moodle.nix Normal file
View file

@ -0,0 +1,22 @@
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;
'';
})