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 ¶
const DummyPrefix = "dumy-"
DummyPrefix is the name prefix used for transient dummy network interfaces.
Variables ¶
This section is empty.
Functions ¶
func NewTransient ¶
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 ¶
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 ¶
type Opt ¶ added in v1.5.0
Opt is a configuration option when creating a new dummy network interface.
func InNamespace ¶ added in v1.5.0
InNamespace configures a dummy network interface to be created in the network namespace referenced by fdref, instead of creating it in the current network namespace.