-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This is a very simple NixOS test to assert the fact that the VPP socket is receiving commands as intended and works more or less. In the future, this should properly be extended to real test exchanging packets between a non-VPP system and a VPP system. Signed-off-by: Raito Bezarius <[email protected]>
- Loading branch information
1 parent
669cf96
commit e1c90df
Showing
2 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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") | ||
''; | ||
}) |