Skip to content

Commit

Permalink
tests,macvtap: Export vars to const
Browse files Browse the repository at this point in the history
macvtapLowerDevice and macvtapNetworkName are set with
the same values for each test.

Signed-off-by: Or Mergi <[email protected]>
  • Loading branch information
ormergi committed Jan 30, 2024
1 parent 9ddfeaa commit ea81d42
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/network/macvtap.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -65,9 +68,6 @@ var _ = SIGDescribe("Macvtap", decorators.Macvtap, func() {

BeforeEach(func() {
virtClient = kubevirt.Client()

macvtapLowerDevice = "eth0"
macvtapNetworkName = "net1"
})

BeforeEach(func() {
Expand Down

0 comments on commit ea81d42

Please sign in to comment.