Documentation ¶
Index ¶
- Variables
- func AddIPTableDebugContainer(pod *corev1.Pod) *corev1.Pod
- func AddSCTPNetcatServerToPod(pod *corev1.Pod, port intstr.IntOrString) *corev1.Pod
- func AddTCPNetcatServerToPod(pod *corev1.Pod, port intstr.IntOrString) *corev1.Pod
- func AddUDPNetcatServerToPod(pod *corev1.Pod, port intstr.IntOrString) *corev1.Pod
- func Reach(destinationPod *corev1.Pod, opts ...ReachOpt) types.GomegaMatcher
- type ReachMatcher
- type ReachOpt
Constants ¶
This section is empty.
Variables ¶
var ( SriovResource = "sriovnicMultiNetworkpolicyResource" TestNetworkName = "test-multi-networkpolicy-sriov-network" TestNetworkNamespace = namespaces.Default TestNetworkNamespacedName = TestNetworkNamespace + "/" + TestNetworkName )
Functions ¶
func AddIPTableDebugContainer ¶
AddIPTableDebugContainer adds a container that polls iptables information and print them to stdout
func AddSCTPNetcatServerToPod ¶
AddSCTPNetcatServerToPod adds a container to the pod with a SCTP netcat server that are suitable to be used with ReachMatcher.
func AddTCPNetcatServerToPod ¶
AddTCPNetcatServerToPod adds a container to the pod with a TCP netcat server that are suitable to be used with ReachMatcher.
func AddUDPNetcatServerToPod ¶
AddUDPNetcatServerToPod adds a container to the pod with a UDP netcat server that are suitable to be used with ReachMatcher.
Types ¶
type ReachMatcher ¶
type ReachMatcher struct {
// contains filtered or unexported fields
}
ReachMatcher allows making assertion on pod connectivity using netcat servers and clients
func (*ReachMatcher) FailureMessage ¶
func (m *ReachMatcher) FailureMessage(actual interface{}) string
func (*ReachMatcher) Match ¶
func (m *ReachMatcher) Match(actual interface{}) (bool, error)
Match checks if the actual meets the Reach condition.
func (*ReachMatcher) NegatedFailureMessage ¶
func (m *ReachMatcher) NegatedFailureMessage(actual interface{}) string
NegatedFailureMessage builds the message to show in case of negated assertion failure
type ReachOpt ¶
type ReachOpt func(*ReachMatcher)
ReachOpt describe a function that applies to a ReachMatcher
var ViaIPv4 ReachOpt = func(s *ReachMatcher) { s.ipFamily = corev1.IPv4Protocol }
ViaIPv4 specifies to use v4 as IP family.
var ViaIPv6 ReachOpt = func(s *ReachMatcher) { s.ipFamily = corev1.IPv6Protocol }
ViaIPv6 specifies to use v6 as IP family.
var ViaSCTP ReachOpt = func(s *ReachMatcher) { s.protocol = corev1.ProtocolSCTP }
ViaSCTP specifies that the SCTP protocol must be used to check the connectivity.
var ViaTCP ReachOpt = func(s *ReachMatcher) { s.protocol = corev1.ProtocolTCP }
ViaTCP specifies that the TCP protocol must be used to check the connectivity.
var ViaUDP ReachOpt = func(s *ReachMatcher) { s.protocol = corev1.ProtocolUDP }
ViaUDP specifies that the UDP protocol must be used to check the connectivity.
func OnPort ¶
func OnPort(port intstr.IntOrString) ReachOpt
OnPort specifies the destination port to be used in the matcher.