Created
October 10, 2019 18:47
-
-
Save srhb/cf0ce27906b9dc27c1e60df9bd2041b6 to your computer and use it in GitHub Desktop.
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
{ system ? builtins.currentSystem, | |
config ? {}, | |
pkgs ? import <nixpkgs> { inherit system config; overlays = []; } | |
}: | |
with import (pkgs.path + /nixos/lib/testing.nix) { inherit system pkgs; }; | |
with pkgs.lib; | |
let | |
mac1 = "6a:bb:84:02:50:c4"; | |
mac2 = "6a:bb:84:02:50:c5"; | |
in | |
makeTest { | |
name = "bond-hwaddr-shenanigans"; | |
machine = { config, pkgs, ... }: { | |
virtualisation.vlans = [ 1 2 3 ]; | |
networking = { | |
interfaces.eth1.macAddress = mac1; | |
interfaces.eth1.ipv4.addresses = mkOverride 0 []; | |
interfaces.eth2.macAddress = mac2; | |
interfaces.eth2.ipv4.addresses = mkOverride 0 []; | |
bonds.bond.interfaces = [ "eth1" "eth2" ]; | |
bonds.bond.driverOptions.mode = "802.3ad"; | |
}; | |
}; | |
testScript = '' | |
startAll; | |
$machine->waitUntilSucceeds('ip a | grep ${mac1}'); | |
$machine->succeed('systemctl restart bond-netdev.service'); | |
$machine->succeed('ip a | grep ${mac1}'); | |
''; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment