mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 16:33:15 +00:00
nixos/snmpd: add nixos test
This commit is contained in:
parent
2b0bf78df6
commit
afdbb7a9c0
@ -765,6 +765,7 @@ in {
|
||||
sing-box = handleTest ./sing-box.nix {};
|
||||
slimserver = handleTest ./slimserver.nix {};
|
||||
slurm = handleTest ./slurm.nix {};
|
||||
snmpd = handleTest ./snmpd.nix {};
|
||||
smokeping = handleTest ./smokeping.nix {};
|
||||
snapcast = handleTest ./snapcast.nix {};
|
||||
snapper = handleTest ./snapper.nix {};
|
||||
|
23
nixos/tests/snmpd.nix
Normal file
23
nixos/tests/snmpd.nix
Normal file
@ -0,0 +1,23 @@
|
||||
import ./make-test-python.nix ({ pkgs, lib, ... }: {
|
||||
name = "snmpd";
|
||||
|
||||
nodes.snmpd = {
|
||||
environment.systemPackages = with pkgs; [
|
||||
net-snmp
|
||||
];
|
||||
|
||||
services.snmpd = {
|
||||
enable = true;
|
||||
configText = ''
|
||||
rocommunity public
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
start_all();
|
||||
machine.wait_for_unit("snmpd.service")
|
||||
machine.succeed("snmpwalk -v 2c -c public localhost | grep SNMPv2-MIB::sysName.0");
|
||||
'';
|
||||
|
||||
})
|
Loading…
Reference in New Issue
Block a user