diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 8193c3dfe840f..d0c86843e1c83 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -957,6 +957,7 @@ in { vscode-remote-ssh = handleTestOn ["x86_64-linux"] ./vscode-remote-ssh.nix {}; vscodium = discoverTests (import ./vscodium.nix); vsftpd = handleTest ./vsftpd.nix {}; + vpp = handleTest ./vpp.nix { }; warzone2100 = handleTest ./warzone2100.nix {}; wasabibackend = handleTest ./wasabibackend.nix {}; watchdogd = handleTest ./watchdogd.nix {}; diff --git a/nixos/tests/vpp.nix b/nixos/tests/vpp.nix new file mode 100644 index 0000000000000..b652dff2610ba --- /dev/null +++ b/nixos/tests/vpp.nix @@ -0,0 +1,38 @@ +import ./make-test-python.nix ({ pkgs, lib, ... }: +{ + name = "vpp"; + + meta = with pkgs.lib.maintainers; { + maintainers = [ raitobezarius ]; + }; + + nodes = { + node = { ... }: { + # Clearly, VPP is hungry of hugepages… + virtualisation.memorySize = 4096; + services.vpp = { + enable = true; + configFile = pkgs.writeText "startup.conf" '' + unix { + nodaemon + nosyslog + full-coredump + cli-listen /run/vpp/cli.sock + } + + api-trace { + on + } + ''; + }; + }; + }; + + testScript = '' + start_all() + node.wait_for_unit("multi-user.target") + node.wait_for_unit("vpp.service") + node.succeed("vppctl show version | grep -i nixos") + node.succeed("vppctl show interface | grep -i local0") + ''; +})