mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-09 19:13:26 +03:00
parent
9258185510
commit
1c40626d78
2 changed files with 116 additions and 118 deletions
|
@ -597,7 +597,7 @@ in
|
|||
};
|
||||
haka = handleTest ./haka.nix { };
|
||||
haste-server = handleTest ./haste-server.nix { };
|
||||
haproxy = handleTest ./haproxy.nix { };
|
||||
haproxy = runTest ./haproxy.nix;
|
||||
hardened = handleTest ./hardened.nix { };
|
||||
harmonia = runTest ./harmonia.nix;
|
||||
headscale = handleTest ./headscale.nix { };
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
import ./make-test-python.nix (
|
||||
{ lib, pkgs, ... }:
|
||||
{
|
||||
{ lib, hostPkgs, ... }:
|
||||
{
|
||||
name = "haproxy";
|
||||
nodes = {
|
||||
server =
|
||||
{ ... }:
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
services.haproxy = {
|
||||
enable = true;
|
||||
|
@ -67,7 +66,7 @@ import ./make-test-python.nix (
|
|||
];
|
||||
};
|
||||
client =
|
||||
{ ... }:
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
environment.systemPackages = [ pkgs.curlHTTP3 ];
|
||||
};
|
||||
|
@ -81,7 +80,7 @@ import ./make-test-python.nix (
|
|||
raise Exception(f"Command {command} failed with exit code {r}")
|
||||
|
||||
def openssl(command):
|
||||
cmd(f"${pkgs.openssl}/bin/openssl {command}")
|
||||
cmd(f"${lib.getExe hostPkgs.openssl} {command}")
|
||||
|
||||
# Generate CA.
|
||||
openssl("req -new -newkey rsa:4096 -nodes -x509 -days 7 -subj '/C=ZZ/ST=Cloud/L=Unspecified/O=NixOS/OU=Tests/CN=CA Certificate' -keyout cacert.key -out cacert.crt")
|
||||
|
@ -136,5 +135,4 @@ import ./make-test-python.nix (
|
|||
server.sleep(5)
|
||||
assert "We are all good!" in client.succeed("curl -f http://server/index.txt")
|
||||
'';
|
||||
}
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue