mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-09-11 07:15:54 +03:00
openvpn: fix tests and add to passthru.tests
This commit is contained in:
parent
3deee92686
commit
52bdb3481c
@ -406,7 +406,7 @@ in {
|
|||||||
incus = pkgs.recurseIntoAttrs (handleTest ./incus { inherit handleTestOn; });
|
incus = pkgs.recurseIntoAttrs (handleTest ./incus { inherit handleTestOn; });
|
||||||
influxdb = handleTest ./influxdb.nix {};
|
influxdb = handleTest ./influxdb.nix {};
|
||||||
influxdb2 = handleTest ./influxdb2.nix {};
|
influxdb2 = handleTest ./influxdb2.nix {};
|
||||||
initrd-network-openvpn = handleTest ./initrd-network-openvpn {};
|
initrd-network-openvpn = handleTestOn [ "x86_64-linux" "i686-linux" ] ./initrd-network-openvpn {};
|
||||||
initrd-network-ssh = handleTest ./initrd-network-ssh {};
|
initrd-network-ssh = handleTest ./initrd-network-ssh {};
|
||||||
initrd-luks-empty-passphrase = handleTest ./initrd-luks-empty-passphrase.nix {};
|
initrd-luks-empty-passphrase = handleTest ./initrd-luks-empty-passphrase.nix {};
|
||||||
initrdNetwork = handleTest ./initrd-network.nix {};
|
initrdNetwork = handleTest ./initrd-network.nix {};
|
||||||
@ -830,7 +830,7 @@ in {
|
|||||||
systemd-initrd-vconsole = handleTest ./systemd-initrd-vconsole.nix {};
|
systemd-initrd-vconsole = handleTest ./systemd-initrd-vconsole.nix {};
|
||||||
systemd-initrd-networkd = handleTest ./systemd-initrd-networkd.nix {};
|
systemd-initrd-networkd = handleTest ./systemd-initrd-networkd.nix {};
|
||||||
systemd-initrd-networkd-ssh = handleTest ./systemd-initrd-networkd-ssh.nix {};
|
systemd-initrd-networkd-ssh = handleTest ./systemd-initrd-networkd-ssh.nix {};
|
||||||
systemd-initrd-networkd-openvpn = handleTest ./initrd-network-openvpn { systemdStage1 = true; };
|
systemd-initrd-networkd-openvpn = handleTestOn [ "x86_64-linux" "i686-linux" ] ./initrd-network-openvpn { systemdStage1 = true; };
|
||||||
systemd-initrd-vlan = handleTest ./systemd-initrd-vlan.nix {};
|
systemd-initrd-vlan = handleTest ./systemd-initrd-vlan.nix {};
|
||||||
systemd-journal = handleTest ./systemd-journal.nix {};
|
systemd-journal = handleTest ./systemd-journal.nix {};
|
||||||
systemd-machinectl = handleTest ./systemd-machinectl.nix {};
|
systemd-machinectl = handleTest ./systemd-machinectl.nix {};
|
||||||
|
@ -59,18 +59,19 @@ import ../make-test-python.nix ({ lib, ...}:
|
|||||||
|
|
||||||
# This command does not fork to keep the VM in the state where
|
# This command does not fork to keep the VM in the state where
|
||||||
# only the initramfs is loaded
|
# only the initramfs is loaded
|
||||||
preLVMCommands =
|
preLVMCommands = lib.mkIf (!systemdStage1)
|
||||||
''
|
''
|
||||||
/bin/nc -p 1234 -lke /bin/echo TESTVALUE
|
/bin/nc -p 1234 -lke /bin/echo TESTVALUE
|
||||||
'';
|
'';
|
||||||
|
|
||||||
network = {
|
network = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
# Work around udhcpc only getting a lease on eth0
|
# Work around udhcpc only getting a lease on eth0
|
||||||
postCommands = ''
|
postCommands = lib.mkIf (!systemdStage1)
|
||||||
/bin/ip addr add 192.168.1.2/24 dev eth1
|
''
|
||||||
'';
|
/bin/ip addr add 192.168.1.2/24 dev eth1
|
||||||
|
'';
|
||||||
|
|
||||||
# Example configuration for OpenVPN
|
# Example configuration for OpenVPN
|
||||||
# This is the main reason for this test
|
# This is the main reason for this test
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
, update-systemd-resolved
|
, update-systemd-resolved
|
||||||
, pkcs11Support ? false
|
, pkcs11Support ? false
|
||||||
, pkcs11helper
|
, pkcs11helper
|
||||||
|
, nixosTests
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
@ -75,9 +76,14 @@ let
|
|||||||
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
openvpn = generic {
|
openvpn = (generic {
|
||||||
version = "2.6.8";
|
version = "2.6.8";
|
||||||
sha256 = "sha256-Xt4VZcim2IAQD38jUxen7p7qg9UFLbVUfxOp52r3gF0=";
|
sha256 = "sha256-Xt4VZcim2IAQD38jUxen7p7qg9UFLbVUfxOp52r3gF0=";
|
||||||
extraBuildInputs = [ openssl ];
|
extraBuildInputs = [ openssl ];
|
||||||
};
|
}).overrideAttrs
|
||||||
|
(_: {
|
||||||
|
passthru.tests = {
|
||||||
|
inherit (nixosTests) initrd-network-openvpn systemd-initrd-networkd-openvpn;
|
||||||
|
};
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user