openvpn: fix tests and add to passthru.tests

This commit is contained in:
Yongun Seong
2023-12-20 18:23:08 +09:00
parent 3deee92686
commit 52bdb3481c
3 changed files with 18 additions and 11 deletions

View File

@@ -59,18 +59,19 @@ import ../make-test-python.nix ({ lib, ...}:
# This command does not fork to keep the VM in the state where
# only the initramfs is loaded
preLVMCommands =
''
/bin/nc -p 1234 -lke /bin/echo TESTVALUE
'';
preLVMCommands = lib.mkIf (!systemdStage1)
''
/bin/nc -p 1234 -lke /bin/echo TESTVALUE
'';
network = {
enable = true;
# Work around udhcpc only getting a lease on eth0
postCommands = ''
/bin/ip addr add 192.168.1.2/24 dev eth1
'';
postCommands = lib.mkIf (!systemdStage1)
''
/bin/ip addr add 192.168.1.2/24 dev eth1
'';
# Example configuration for OpenVPN
# This is the main reason for this test