From ea81d4276f4c91d7e7e18dc0698dc890e6e6143a Mon Sep 17 00:00:00 2001 From: Or Mergi Date: Thu, 25 Jan 2024 14:37:04 +0200 Subject: [PATCH] tests,macvtap: Export vars to const macvtapLowerDevice and macvtapNetworkName are set with the same values for each test. Signed-off-by: Or Mergi --- tests/network/macvtap.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/network/macvtap.go b/tests/network/macvtap.go index af3450784375..46465eee1c9e 100644 --- a/tests/network/macvtap.go +++ b/tests/network/macvtap.go @@ -54,9 +54,12 @@ const ( ) var _ = SIGDescribe("Macvtap", decorators.Macvtap, func() { + const ( + macvtapLowerDevice = "eth0" + macvtapNetworkName = "net1" + ) + var virtClient kubecli.KubevirtClient - var macvtapLowerDevice string - var macvtapNetworkName string createMacvtapNetworkAttachmentDefinition := func(namespace, networkName, macvtapLowerDevice string) error { macvtapNad := fmt.Sprintf(macvtapNetworkConfNAD, networkName, namespace, macvtapLowerDevice, networkName) @@ -65,9 +68,6 @@ var _ = SIGDescribe("Macvtap", decorators.Macvtap, func() { BeforeEach(func() { virtClient = kubevirt.Client() - - macvtapLowerDevice = "eth0" - macvtapNetworkName = "net1" }) BeforeEach(func() {