mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 13:40:28 +03:00
commit
87fdc06a97
6 changed files with 366 additions and 0 deletions
|
@ -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
22
nixos/tests/moodle.nix
Normal 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;
|
||||
'';
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue