From 1b248a79a0e599e7807d4e2223f7e2ba5f4b55ac Mon Sep 17 00:00:00 2001 From: Shaun Crampton Date: Mon, 24 Feb 2020 14:05:07 +0000 Subject: [PATCH] Post-merge fix-ups. --- fv/rule_metadata_test.go | 9 +++++---- fv/spoof_test.go | 11 ++++++----- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/fv/rule_metadata_test.go b/fv/rule_metadata_test.go index 30a5a43197..6c2107f8a8 100644 --- a/fv/rule_metadata_test.go +++ b/fv/rule_metadata_test.go @@ -1,6 +1,4 @@ -// +build fvtests - -// Copyright (c) 2019-2020 Tigera, Inc. All rights reserved. +// Copyright (c) 2020 Tigera, Inc. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -14,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +// +build fvtests + package fv_test import ( @@ -22,6 +22,7 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" + "github.com/projectcalico/felix/fv/connectivity" "github.com/projectcalico/felix/fv/containers" "github.com/projectcalico/felix/fv/infrastructure" "github.com/projectcalico/felix/fv/utils" @@ -157,7 +158,7 @@ var _ = Describe("Rule Metadata tests", func() { // This test case verifies that "interesting" annotations like newlines and unicode don't break // Felix's iptables handling code, which parses the output of iptables-save It("should allow connectivity between workloads", func() { - cc := &workload.ConnectivityChecker{ + cc := &connectivity.Checker{ ReverseDirection: false, Protocol: "tcp", } diff --git a/fv/spoof_test.go b/fv/spoof_test.go index 3cad2cc651..575c1e24ed 100644 --- a/fv/spoof_test.go +++ b/fv/spoof_test.go @@ -1,5 +1,3 @@ -// +build fvtests - // Copyright (c) 2020 Tigera, Inc. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +// +build fvtests + package fv_test import ( @@ -22,6 +22,7 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" + "github.com/projectcalico/felix/fv/connectivity" "github.com/projectcalico/felix/fv/infrastructure" "github.com/projectcalico/felix/fv/workload" ) @@ -31,7 +32,7 @@ var _ = Describe("Spoof tests", func() { infra infrastructure.DatastoreInfra felixes []*infrastructure.Felix w [3]*workload.Workload - cc *workload.ConnectivityChecker + cc *connectivity.Checker ) teardownInfra := func() { @@ -60,7 +61,7 @@ var _ = Describe("Spoof tests", func() { spoofTests := func() { It("should drop spoofed traffic", func() { - cc = &workload.ConnectivityChecker{} + cc = &connectivity.Checker{} // Setup a spoofed workload. Make w[0] spoof w[2] by making it // use w[2]'s IP to test connections. spoofed := &workload.SpoofedWorkload{ @@ -79,7 +80,7 @@ var _ = Describe("Spoof tests", func() { }) It("should allow workload's traffic if workload spoofs its own IP", func() { - cc = &workload.ConnectivityChecker{} + cc = &connectivity.Checker{} // Setup a "spoofed" workload. Make w[0] spoof itself. spoofed := &workload.SpoofedWorkload{ Workload: w[0],