at 23.05-pre 798 B view raw
1import ./make-test-python.nix ({ pkgs, lib, ... }: { 2 name = "moodle"; 3 meta.maintainers = [ lib.maintainers.aanderse ]; 4 5 nodes.machine = 6 { ... }: 7 { services.moodle.enable = true; 8 services.moodle.virtualHost.hostName = "localhost"; 9 services.moodle.virtualHost.adminAddr = "root@example.com"; 10 services.moodle.initialPassword = "correcthorsebatterystaple"; 11 12 # Ensure the virtual machine has enough memory to avoid errors like: 13 # Fatal error: Out of memory (allocated 152047616) (tried to allocate 33554440 bytes) 14 virtualisation.memorySize = 2000; 15 }; 16 17 testScript = '' 18 start_all() 19 machine.wait_for_unit("phpfpm-moodle.service", timeout=1800) 20 machine.wait_until_succeeds("curl http://localhost/ | grep 'You are not logged in'") 21 ''; 22})