mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-30 19:02:57 +00:00
25bef2d8f9
The library does not depend on stdenv, that `stdenv` exposes `lib` is an artifact of the ancient origins of nixpkgs.
45 lines
1.1 KiB
Nix
45 lines
1.1 KiB
Nix
import ./make-test-python.nix ({ pkgs, ... }:
|
|
|
|
{
|
|
name = "samba-wsdd";
|
|
meta.maintainers = with pkgs.lib.maintainers; [ izorkin ];
|
|
|
|
nodes = {
|
|
client_wsdd = { pkgs, ... }: {
|
|
services.samba-wsdd = {
|
|
enable = true;
|
|
interface = "eth1";
|
|
workgroup = "WORKGROUP";
|
|
hostname = "CLIENT-WSDD";
|
|
discovery = true;
|
|
extraOptions = [ "--no-host" ];
|
|
};
|
|
networking.firewall.allowedTCPPorts = [ 5357 ];
|
|
networking.firewall.allowedUDPPorts = [ 3702 ];
|
|
};
|
|
|
|
server_wsdd = { ... }: {
|
|
services.samba-wsdd = {
|
|
enable = true;
|
|
interface = "eth1";
|
|
workgroup = "WORKGROUP";
|
|
hostname = "SERVER-WSDD";
|
|
};
|
|
networking.firewall.allowedTCPPorts = [ 5357 ];
|
|
networking.firewall.allowedUDPPorts = [ 3702 ];
|
|
};
|
|
};
|
|
|
|
testScript = ''
|
|
client_wsdd.start()
|
|
client_wsdd.wait_for_unit("samba-wsdd")
|
|
|
|
server_wsdd.start()
|
|
server_wsdd.wait_for_unit("samba-wsdd")
|
|
|
|
client_wsdd.wait_until_succeeds(
|
|
"echo list | ${pkgs.libressl.nc}/bin/nc -U /run/wsdd/wsdd.sock | grep -i SERVER-WSDD"
|
|
)
|
|
'';
|
|
})
|