From 8615c40fac021dcaafce3963114d2b72e4b73df7 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Thu, 28 Jun 2018 20:07:40 +0200 Subject: [PATCH] netconfig_test: reset DefaultCounter to catch preservation issues --- integration/netconfig/netconfig_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration/netconfig/netconfig_test.go b/integration/netconfig/netconfig_test.go index 36379c1..c63f915 100644 --- a/integration/netconfig/netconfig_test.go +++ b/integration/netconfig/netconfig_test.go @@ -128,7 +128,6 @@ func TestNetconfig(t *testing.T) { } netconfig.DefaultCounter = expr.Counter{Packets: 23, Bytes: 42} - if err := netconfig.Apply(tmp, filepath.Join(tmp, "root")); err != nil { t.Fatalf("netconfig.Apply: %v", err) } @@ -136,6 +135,7 @@ func TestNetconfig(t *testing.T) { // Apply twice to ensure the absence of errors when dealing with // already-configured interfaces, addresses, routes, … (and ensure // nftables rules are replaced, not appendend to). + netconfig.DefaultCounter = expr.Counter{Packets: 0, Bytes: 0} if err := netconfig.Apply(tmp, filepath.Join(tmp, "root")); err != nil { t.Fatalf("netconfig.Apply: %v", err) }