From d635dc85ce69cc47c7c28b5604c30d57926affb8 Mon Sep 17 00:00:00 2001 From: Serge Bazanski Date: Sat, 11 Jun 2022 21:54:04 +0200 Subject: [PATCH] bgpwtf: edge01: fix tests Change-Id: I66852cc75f3d5a6ce3cc67790c09e248874b0a9b Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1338 Reviewed-by: implr --- bgpwtf/machines/modules/gretap.nix | 2 +- bgpwtf/machines/tests/edge01-waw.nix | 13 ++++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/bgpwtf/machines/modules/gretap.nix b/bgpwtf/machines/modules/gretap.nix index 7d3d847a..f4e1a7b2 100644 --- a/bgpwtf/machines/modules/gretap.nix +++ b/bgpwtf/machines/modules/gretap.nix @@ -56,7 +56,7 @@ in { ]; serviceConfig = { Type = "oneshot"; - ExecStart = "${pkgs.iproute2}/bin/ip link add name ${name} type gretap remote ${value.remoteV4} local ${value.localV4} key ${toString value.id}"; + ExecStart = "${pkgs.iproute}/bin/ip link add name ${name} type gretap remote ${value.remoteV4} local ${value.localV4} key ${toString value.id}"; }; }) cfg.interfaces; } diff --git a/bgpwtf/machines/tests/edge01-waw.nix b/bgpwtf/machines/tests/edge01-waw.nix index 6b641b56..0a1e2601 100644 --- a/bgpwtf/machines/tests/edge01-waw.nix +++ b/bgpwtf/machines/tests/edge01-waw.nix @@ -19,9 +19,16 @@ # nix-build -A bgpwtf.machines.tests.edge01-waw.driver && result/bin/nixos-test-driver # >>> start_all() -{ hscloud, pkgsSrc, pkgs, lib, ... }: +{ hscloud, ... }: -with lib; +# Use pkgs that edge01 is using. Perhaps we shouldn't use them for +# _everything_, but this will have to do. +let + pkgs = hscloud.ops.machines."edge01.waw.bgp.wtf".pkgs; + pkgsSrc = pkgs.path; + lib = pkgs.lib; + +in with lib; let @@ -262,7 +269,7 @@ test = import "${pkgsSrc}/nixos/tests/make-test-python.nix" ({ pkgs, libs, ... } # edge01 must announce exactly one v4 prefix. bgpspeaker.succeed("birdc show route protocol bgp_globalmix_v4 | grep unicast") bgpspeaker.fail( - "birdc show route protocol bgp_globalmix_v4 | grep unicast | grep -v 185.236.240.0/24" + "birdc show route protocol bgp_globalmix_v4 | grep unicast | grep -v 185.236.240.0/23" ) # edge01 must announce exactly one v6 prefix.