2020-11-23 14:13:22 +00:00
|
|
|
import ./make-test-python.nix ({ pkgs, ... }:
|
|
|
|
|
|
|
|
{
|
|
|
|
name = "samba-wsdd";
|
2021-01-10 19:08:30 +00:00
|
|
|
meta.maintainers = with pkgs.lib.maintainers; [ izorkin ];
|
2020-11-23 14:13:22 +00:00
|
|
|
|
|
|
|
nodes = {
|
|
|
|
client_wsdd = { pkgs, ... }: {
|
|
|
|
services.samba-wsdd = {
|
|
|
|
enable = true;
|
2023-07-13 18:06:44 +00:00
|
|
|
openFirewall = true;
|
2020-11-23 14:13:22 +00:00
|
|
|
interface = "eth1";
|
|
|
|
workgroup = "WORKGROUP";
|
|
|
|
hostname = "CLIENT-WSDD";
|
|
|
|
discovery = true;
|
|
|
|
extraOptions = [ "--no-host" ];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
server_wsdd = { ... }: {
|
|
|
|
services.samba-wsdd = {
|
|
|
|
enable = true;
|
2023-07-13 18:06:44 +00:00
|
|
|
openFirewall = true;
|
2020-11-23 14:13:22 +00:00
|
|
|
interface = "eth1";
|
|
|
|
workgroup = "WORKGROUP";
|
|
|
|
hostname = "SERVER-WSDD";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
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(
|
2021-12-08 13:44:16 +00:00
|
|
|
"echo list | ${pkgs.libressl.nc}/bin/nc -N -U /run/wsdd/wsdd.sock | grep -i SERVER-WSDD"
|
2020-11-23 14:13:22 +00:00
|
|
|
)
|
|
|
|
'';
|
|
|
|
})
|