mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-09-20 04:19:00 +02:00
nixosTests.dnscrypt-proxy2: Check that a UDP port is being listened on
Motivation: Ensure this test catches startup failures such as https://github.com/NixOS/nixpkgs/issues/197443
This commit is contained in:
parent
95aeaf83c2
commit
98d2540aef
|
@ -1,4 +1,6 @@
|
|||
import ./make-test-python.nix ({ pkgs, ... }: {
|
||||
import ./make-test-python.nix ({ pkgs, ... }: let
|
||||
localProxyPort = 43;
|
||||
in {
|
||||
name = "dnscrypt-proxy2";
|
||||
meta = with pkgs.lib.maintainers; {
|
||||
maintainers = [ joachifm ];
|
||||
|
@ -9,7 +11,6 @@ import ./make-test-python.nix ({ pkgs, ... }: {
|
|||
# for a caching DNS client.
|
||||
client =
|
||||
{ ... }:
|
||||
let localProxyPort = 43; in
|
||||
{
|
||||
security.apparmor.enable = true;
|
||||
|
||||
|
@ -32,5 +33,6 @@ import ./make-test-python.nix ({ pkgs, ... }: {
|
|||
testScript = ''
|
||||
client.wait_for_unit("dnsmasq")
|
||||
client.wait_for_unit("dnscrypt-proxy2")
|
||||
client.wait_until_succeeds("ss --numeric --udp --listening | grep -q ${toString localProxyPort}")
|
||||
'';
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue