1 import ./make-test-python.nix ({ pkgs, lib, ... }: {
3 meta.maintainers = with lib.maintainers; [ zaldnoay ];
9 firewall.enable = false;
12 systemd.network.networks."01-eth1" = {
14 networkConfig.Address = "10.0.0.1/24";
34 systemd.network.networks."01-eth1" = {
36 networkConfig.Address = "10.0.0.2/24";
41 adminAddr = "admin@example.com";
42 virtualHosts."test-appication" =
44 testdir = pkgs.writeTextDir "web/index.php" "<?php phpinfo();";
47 documentRoot = "${testdir}/web";
49 index = "index.php index.html";
52 phpPackage = pkgs.php81;
60 serverAddr = "10.0.0.1";
67 customDomains = [ "10.0.0.1" ];
77 frps.wait_for_unit("frp.service")
78 frps.wait_for_open_port(80)
79 frpc.wait_for_unit("frp.service")
80 response = frpc.succeed("curl -fvvv -s http://127.0.0.1/")
81 assert "PHP Version ${pkgs.php81.version}" in response, "PHP version not detected"
82 response = frpc.succeed("curl -fvvv -s http://10.0.0.1/")
83 assert "PHP Version ${pkgs.php81.version}" in response, "PHP version not detected"