dummy

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 16, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package dummy helps with creating transient dummy type virtual network interfaces for testing purposes. It leverages the Ginkgo testing framework and matching (erm, sic!) Gomega matchers.

The "dummy" network interfaces created by this package are transient because they automatically get removed at the end of the a test (spec, block/group, suite, et cetera) using Ginkgo's DeferCleanup.

Index

Constants

View Source
const DummyPrefix = "dumy-"

DummyPrefix is the name prefix used for transient dummy network interfaces.

Variables

This section is empty.

Functions

func NewTransient

func NewTransient() netlink.Link

NewTransient creates a transient network interface of type "dummy". It does not configure any IP address(es) though. NewTransient automatically defers proper automatic removal of the dummy network interface.

func NewTransientUp

func NewTransientUp() netlink.Link

NewTransientUp creates a transient network interface of type "dummy" and additionally brings it up. It does not configure any IP address(es) though. NewTransient automatically defers proper automatic removal of the dummy network interface.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL