mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-14 06:00:33 +03:00
nixos/flood: init
This commit is contained in:
parent
a12b153874
commit
1cfd74809b
5 changed files with 119 additions and 0 deletions
|
@ -328,6 +328,7 @@ in {
|
|||
firewall-nftables = handleTest ./firewall.nix { nftables = true; };
|
||||
fish = handleTest ./fish.nix {};
|
||||
flannel = handleTestOn ["x86_64-linux"] ./flannel.nix {};
|
||||
flood = handleTest ./flood.nix {};
|
||||
floorp = handleTest ./firefox.nix { firefoxPackage = pkgs.floorp; };
|
||||
fluentd = handleTest ./fluentd.nix {};
|
||||
fluidd = handleTest ./fluidd.nix {};
|
||||
|
|
27
nixos/tests/flood.nix
Normal file
27
nixos/tests/flood.nix
Normal file
|
@ -0,0 +1,27 @@
|
|||
import ./make-test-python.nix ({ pkgs, ... }:
|
||||
let
|
||||
port = 3001;
|
||||
in
|
||||
{
|
||||
name = "flood";
|
||||
meta = {
|
||||
maintainers = with pkgs.lib.maintainers; [ thiagokokada ];
|
||||
};
|
||||
|
||||
nodes.machine = { pkgs, ... }: {
|
||||
services.flood = {
|
||||
inherit port;
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
extraArgs = [ "--baseuri=/" ];
|
||||
};
|
||||
};
|
||||
|
||||
testScript = /* python */ ''
|
||||
machine.start()
|
||||
machine.wait_for_unit("flood.service")
|
||||
machine.wait_for_open_port(${toString port})
|
||||
|
||||
machine.succeed("curl --fail http://localhost:${toString port}")
|
||||
'';
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue