Documentation ¶
Index ¶
- func IsDirEmpty(name string) (bool, error)
- func RunCommandOnNode(nodeName string, cmd string) (code int, stdout string, stderr string, err error)
- type ClusterInfo
- type ClusterNode
- type Connectivity
- type ConnectivityTable
- func (ct *ConnectivityTable) Compare(other *ConnectivityTable) *TruthTable
- func (ct *ConnectivityTable) Get(from string, to string) PodConnectivityMark
- func (ct *ConnectivityTable) PrettyPrint(indent string) string
- func (ct *ConnectivityTable) Set(from string, to string, value PodConnectivityMark)
- func (ct *ConnectivityTable) SetAllFrom(from string, value PodConnectivityMark)
- func (ct *ConnectivityTable) SetAllTo(to string, value PodConnectivityMark)
- type CustomPod
- type KubernetesUtils
- func (k *KubernetesUtils) Bootstrap(namespaces, pods []string) (*map[string][]string, error)
- func (k *KubernetesUtils) BuildService(svcName, svcNS string, port, targetPort int, selector map[string]string, ...) *v1.Service
- func (k *KubernetesUtils) CleanACNPs() error
- func (k *KubernetesUtils) CleanANPs(namespaces []string) error
- func (k *KubernetesUtils) CleanCGs() error
- func (k *KubernetesUtils) CleanLegacyACNPs() error
- func (k *KubernetesUtils) CleanLegacyANPs(namespaces []string) error
- func (k *KubernetesUtils) CleanLegacyCGs() error
- func (k *KubernetesUtils) CleanNetworkPolicies(namespaces []string) error
- func (k *KubernetesUtils) CleanServices(namespaces []string) error
- func (k *KubernetesUtils) Cleanup(namespaces []string)
- func (k *KubernetesUtils) CreateCG(name string, pSelector, nSelector *metav1.LabelSelector, ...) (*crdv1alpha3.ClusterGroup, error)
- func (k *KubernetesUtils) CreateLegacyCG(name string, pSelector, nSelector *metav1.LabelSelector, ...) (*legacycorev1a2.ClusterGroup, error)
- func (k *KubernetesUtils) CreateNewLegacyTier(name string, tierPriority int32) (*legacysecv1alpha1.Tier, error)
- func (k *KubernetesUtils) CreateNewTier(name string, tierPriority int32) (*crdv1alpha1.Tier, error)
- func (k *KubernetesUtils) CreateOrUpdateACNP(cnp *crdv1alpha1.ClusterNetworkPolicy) (*crdv1alpha1.ClusterNetworkPolicy, error)
- func (k *KubernetesUtils) CreateOrUpdateANP(anp *crdv1alpha1.NetworkPolicy) (*crdv1alpha1.NetworkPolicy, error)
- func (k *KubernetesUtils) CreateOrUpdateDeployment(ns, deploymentName string, replicas int32, labels map[string]string) (*appsv1.Deployment, error)
- func (k *KubernetesUtils) CreateOrUpdateLegacyACNP(cnp *legacysecv1alpha1.ClusterNetworkPolicy) (*legacysecv1alpha1.ClusterNetworkPolicy, error)
- func (k *KubernetesUtils) CreateOrUpdateLegacyANP(anp *legacysecv1alpha1.NetworkPolicy) (*legacysecv1alpha1.NetworkPolicy, error)
- func (k *KubernetesUtils) CreateOrUpdateLegacyCG(cg *legacycorev1a2.ClusterGroup) (*legacycorev1a2.ClusterGroup, error)
- func (k *KubernetesUtils) CreateOrUpdateNamespace(n string, labels map[string]string) (*v1.Namespace, error)
- func (k *KubernetesUtils) CreateOrUpdateNetworkPolicy(netpol *v1net.NetworkPolicy) (*v1net.NetworkPolicy, error)
- func (k *KubernetesUtils) CreateOrUpdateService(svc *v1.Service) (*v1.Service, error)
- func (k *KubernetesUtils) CreateOrUpdateV1Alpha2CG(cg *crdv1alpha2.ClusterGroup) (*crdv1alpha2.ClusterGroup, error)
- func (k *KubernetesUtils) CreateOrUpdateV1Alpha3CG(cg *crdv1alpha3.ClusterGroup) (*crdv1alpha3.ClusterGroup, error)
- func (k *KubernetesUtils) DeleteACNP(name string) error
- func (k *KubernetesUtils) DeleteANP(ns, name string) error
- func (k *KubernetesUtils) DeleteLegacyACNP(name string) error
- func (k *KubernetesUtils) DeleteLegacyANP(ns, name string) error
- func (k *KubernetesUtils) DeleteLegacyCG(name string) error
- func (k *KubernetesUtils) DeleteLegacyTier(name string) error
- func (k *KubernetesUtils) DeleteNetworkPolicy(ns, name string) error
- func (k *KubernetesUtils) DeleteService(ns, name string) error
- func (k *KubernetesUtils) DeleteTier(name string) error
- func (k *KubernetesUtils) DeleteV1Alpha2CG(name string) error
- func (k *KubernetesUtils) DeleteV1Alpha3CG(name string) error
- func (k *KubernetesUtils) GetACNP(name string) (*crdv1alpha1.ClusterNetworkPolicy, error)
- func (k *KubernetesUtils) GetANP(namespace, name string) (*crdv1alpha1.NetworkPolicy, error)
- func (k *KubernetesUtils) GetCG(name string) (*crdv1alpha2.ClusterGroup, error)
- func (k *KubernetesUtils) GetNetworkPolicy(namespace, name string) (*v1net.NetworkPolicy, error)
- func (k *KubernetesUtils) GetPodByLabel(ns string, name string) (*v1.Pod, error)
- func (k *KubernetesUtils) GetPodsByLabel(ns string, key string, val string) ([]v1.Pod, error)
- func (k *KubernetesUtils) GetService(namespace, name string) (*v1.Service, error)
- func (k *KubernetesUtils) GetTier(name string) (*crdv1alpha1.Tier, error)
- func (k *KubernetesUtils) GetV1Alpha2CG(cgName string) (*crdv1alpha2.ClusterGroup, error)
- func (k *KubernetesUtils) GetV1Alpha3CG(cgName string) (*crdv1alpha3.ClusterGroup, error)
- func (k *KubernetesUtils) LegacyCleanup(namespaces []string)
- func (k *KubernetesUtils) Probe(ns1, pod1, ns2, pod2 string, port int32, protocol v1.Protocol) (PodConnectivityMark, error)
- func (k *KubernetesUtils) UpdateLegacyTier(tier *legacysecv1alpha1.Tier) (*legacysecv1alpha1.Tier, error)
- func (k *KubernetesUtils) UpdateTier(tier *crdv1alpha1.Tier) (*crdv1alpha1.Tier, error)
- func (k *KubernetesUtils) Validate(allPods []Pod, reachability *Reachability, port int32, protocol v1.Protocol)
- type Pod
- type PodCondition
- type PodConnectivityMark
- type PodIPs
- type Reachability
- func (r *Reachability) Expect(pod1 Pod, pod2 Pod, connectivity PodConnectivityMark)
- func (r *Reachability) ExpectAllEgress(pod Pod, connectivity PodConnectivityMark)
- func (r *Reachability) ExpectAllIngress(pod Pod, connectivity PodConnectivityMark)
- func (r *Reachability) ExpectAllSelfNamespace(connectivity PodConnectivityMark)
- func (r *Reachability) ExpectConn(spec *Connectivity)
- func (r *Reachability) ExpectEgressToNamespace(pod Pod, namespace string, connectivity PodConnectivityMark)
- func (r *Reachability) ExpectIngressFromNamespace(pod Pod, namespace string, connectivity PodConnectivityMark)
- func (r *Reachability) ExpectSelf(allPods []Pod, connectivity PodConnectivityMark)
- func (r *Reachability) ExpectSelfNamespace(namespace string, connectivity PodConnectivityMark)
- func (r *Reachability) Observe(pod1 Pod, pod2 Pod, connectivity PodConnectivityMark)
- func (r *Reachability) PrintSummary(printExpected bool, printObserved bool, printComparison bool)
- func (r *Reachability) Summary() (trueObs int, falseObs int, comparison *TruthTable)
- type TestData
- func (data *TestData) GetAgentFeatures(antreaNamespace string) (featuregate.FeatureGate, error)
- func (data *TestData) GetAntreaConfigMap(antreaNamespace string) (*corev1.ConfigMap, error)
- func (data *TestData) GetControllerFeatures(antreaNamespace string) (featuregate.FeatureGate, error)
- func (data *TestData) GetEncapMode() (config.TrafficEncapModeType, error)
- func (data *TestData) GetFlowAggregatorConfigMap() (*corev1.ConfigMap, error)
- func (data *TestData) GetGatewayInterfaceName(antreaNamespace string) (string, error)
- type TestOptions
- type TruthTable
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsDirEmpty ¶
IsDirEmpty checks whether a directory is empty or not.
Types ¶
type ClusterInfo ¶
type ClusterInfo struct {
// contains filtered or unexported fields
}
type ClusterNode ¶
type ClusterNode struct {
// contains filtered or unexported fields
}
type Connectivity ¶
type Connectivity struct { From Pod To Pod Connectivity PodConnectivityMark }
type ConnectivityTable ¶
type ConnectivityTable struct { Items []string Values map[string]map[string]PodConnectivityMark // contains filtered or unexported fields }
func NewConnectivityTable ¶
func NewConnectivityTable(items []string, defaultValue *PodConnectivityMark) *ConnectivityTable
func (*ConnectivityTable) Compare ¶
func (ct *ConnectivityTable) Compare(other *ConnectivityTable) *TruthTable
func (*ConnectivityTable) Get ¶
func (ct *ConnectivityTable) Get(from string, to string) PodConnectivityMark
func (*ConnectivityTable) PrettyPrint ¶
func (ct *ConnectivityTable) PrettyPrint(indent string) string
func (*ConnectivityTable) Set ¶
func (ct *ConnectivityTable) Set(from string, to string, value PodConnectivityMark)
func (*ConnectivityTable) SetAllFrom ¶
func (ct *ConnectivityTable) SetAllFrom(from string, value PodConnectivityMark)
func (*ConnectivityTable) SetAllTo ¶
func (ct *ConnectivityTable) SetAllTo(to string, value PodConnectivityMark)
type KubernetesUtils ¶
type KubernetesUtils struct { *TestData // contains filtered or unexported fields }
func NewKubernetesUtils ¶
func NewKubernetesUtils(data *TestData) (*KubernetesUtils, error)
func (*KubernetesUtils) Bootstrap ¶
func (k *KubernetesUtils) Bootstrap(namespaces, pods []string) (*map[string][]string, error)
func (*KubernetesUtils) BuildService ¶
func (k *KubernetesUtils) BuildService(svcName, svcNS string, port, targetPort int, selector map[string]string, serviceType *v1.ServiceType) *v1.Service
BuildService is a convenience function for building a corev1.Service spec.
func (*KubernetesUtils) CleanACNPs ¶
func (k *KubernetesUtils) CleanACNPs() error
CleanACNPs is a convenience function for deleting all Antrea ClusterNetworkPolicies in the cluster.
func (*KubernetesUtils) CleanANPs ¶
func (k *KubernetesUtils) CleanANPs(namespaces []string) error
CleanANPs is a convenience function for deleting all Antrea NetworkPolicies in provided namespaces.
func (*KubernetesUtils) CleanCGs ¶
func (k *KubernetesUtils) CleanCGs() error
CleanCGs is a convenience function for deleting all ClusterGroups in the cluster.
func (*KubernetesUtils) CleanLegacyACNPs ¶
func (k *KubernetesUtils) CleanLegacyACNPs() error
CleanLegacyACNPs is a convenience function for deleting all Antrea ClusterNetworkPolicies in the cluster.
func (*KubernetesUtils) CleanLegacyANPs ¶
func (k *KubernetesUtils) CleanLegacyANPs(namespaces []string) error
CleanLegacyANPs is a convenience function for deleting all Antrea NetworkPolicies in provided namespaces.
func (*KubernetesUtils) CleanLegacyCGs ¶
func (k *KubernetesUtils) CleanLegacyCGs() error
CleanCGs is a convenience function for deleting all ClusterGroups in the cluster.
func (*KubernetesUtils) CleanNetworkPolicies ¶
func (k *KubernetesUtils) CleanNetworkPolicies(namespaces []string) error
CleanNetworkPolicies is a convenience function for deleting NetworkPolicies in the provided namespaces.
func (*KubernetesUtils) CleanServices ¶
func (k *KubernetesUtils) CleanServices(namespaces []string) error
CleanServices is a convenience function for deleting Services in the cluster.
func (*KubernetesUtils) Cleanup ¶
func (k *KubernetesUtils) Cleanup(namespaces []string)
func (*KubernetesUtils) CreateCG ¶
func (k *KubernetesUtils) CreateCG(name string, pSelector, nSelector *metav1.LabelSelector, ipBlocks []crdv1alpha1.IPBlock) (*crdv1alpha3.ClusterGroup, error)
CreateCG is a convenience function for creating an Antrea ClusterGroup by name and selector.
func (*KubernetesUtils) CreateLegacyCG ¶
func (k *KubernetesUtils) CreateLegacyCG(name string, pSelector, nSelector *metav1.LabelSelector, ipBlock *crdv1alpha1.IPBlock) (*legacycorev1a2.ClusterGroup, error)
CreateLegacyCG is a convenience function for creating a legacy Antrea ClusterGroup by name and selector.
func (*KubernetesUtils) CreateNewLegacyTier ¶
func (k *KubernetesUtils) CreateNewLegacyTier(name string, tierPriority int32) (*legacysecv1alpha1.Tier, error)
CreateLegacyTier is a convenience function for creating a legacy Antrea Policy Tier by name and priority.
func (*KubernetesUtils) CreateNewTier ¶
func (k *KubernetesUtils) CreateNewTier(name string, tierPriority int32) (*crdv1alpha1.Tier, error)
CreateTier is a convenience function for creating an Antrea Policy Tier by name and priority.
func (*KubernetesUtils) CreateOrUpdateACNP ¶
func (k *KubernetesUtils) CreateOrUpdateACNP(cnp *crdv1alpha1.ClusterNetworkPolicy) (*crdv1alpha1.ClusterNetworkPolicy, error)
CreateOrUpdateACNP is a convenience function for updating/creating AntreaClusterNetworkPolicies.
func (*KubernetesUtils) CreateOrUpdateANP ¶
func (k *KubernetesUtils) CreateOrUpdateANP(anp *crdv1alpha1.NetworkPolicy) (*crdv1alpha1.NetworkPolicy, error)
CreateOrUpdateANP is a convenience function for updating/creating Antrea NetworkPolicies.
func (*KubernetesUtils) CreateOrUpdateDeployment ¶
func (k *KubernetesUtils) CreateOrUpdateDeployment(ns, deploymentName string, replicas int32, labels map[string]string) (*appsv1.Deployment, error)
CreateOrUpdateDeployment is a convenience function for idempotent setup of deployments
func (*KubernetesUtils) CreateOrUpdateLegacyACNP ¶
func (k *KubernetesUtils) CreateOrUpdateLegacyACNP(cnp *legacysecv1alpha1.ClusterNetworkPolicy) (*legacysecv1alpha1.ClusterNetworkPolicy, error)
CreateOrUpdateLegacyACNP is a convenience function for updating/creating AntreaClusterNetworkPolicies.
func (*KubernetesUtils) CreateOrUpdateLegacyANP ¶
func (k *KubernetesUtils) CreateOrUpdateLegacyANP(anp *legacysecv1alpha1.NetworkPolicy) (*legacysecv1alpha1.NetworkPolicy, error)
CreateOrUpdateANP is a convenience function for updating/creating Antrea NetworkPolicies.
func (*KubernetesUtils) CreateOrUpdateLegacyCG ¶
func (k *KubernetesUtils) CreateOrUpdateLegacyCG(cg *legacycorev1a2.ClusterGroup) (*legacycorev1a2.ClusterGroup, error)
CreateOrUpdateLegacyCG is a convenience function for idempotent setup of legacy ClusterGroups
func (*KubernetesUtils) CreateOrUpdateNamespace ¶
func (k *KubernetesUtils) CreateOrUpdateNamespace(n string, labels map[string]string) (*v1.Namespace, error)
CreateOrUpdateNamespace is a convenience function for idempotent setup of Namespaces
func (*KubernetesUtils) CreateOrUpdateNetworkPolicy ¶
func (k *KubernetesUtils) CreateOrUpdateNetworkPolicy(netpol *v1net.NetworkPolicy) (*v1net.NetworkPolicy, error)
CreateOrUpdateNetworkPolicy is a convenience function for updating/creating netpols. Updating is important since some tests update a network policy to confirm that mutation works with a CNI.
func (*KubernetesUtils) CreateOrUpdateService ¶
CreateOrUpdateService is a convenience function for updating/creating Services.
func (*KubernetesUtils) CreateOrUpdateV1Alpha2CG ¶
func (k *KubernetesUtils) CreateOrUpdateV1Alpha2CG(cg *crdv1alpha2.ClusterGroup) (*crdv1alpha2.ClusterGroup, error)
CreateOrUpdateV1Alpha2CG is a convenience function for idempotent setup of crd/v1alpha2 ClusterGroups
func (*KubernetesUtils) CreateOrUpdateV1Alpha3CG ¶
func (k *KubernetesUtils) CreateOrUpdateV1Alpha3CG(cg *crdv1alpha3.ClusterGroup) (*crdv1alpha3.ClusterGroup, error)
CreateOrUpdateV1Alpha3CG is a convenience function for idempotent setup of crd/v1alpha3 ClusterGroups
func (*KubernetesUtils) DeleteACNP ¶
func (k *KubernetesUtils) DeleteACNP(name string) error
DeleteACNP is a convenience function for deleting ACNP by name.
func (*KubernetesUtils) DeleteANP ¶
func (k *KubernetesUtils) DeleteANP(ns, name string) error
DeleteANP is a convenience function for deleting ANP by name and Namespace.
func (*KubernetesUtils) DeleteLegacyACNP ¶
func (k *KubernetesUtils) DeleteLegacyACNP(name string) error
DeleteLegacyACNP is a convenience function for deleting ACNP by name.
func (*KubernetesUtils) DeleteLegacyANP ¶
func (k *KubernetesUtils) DeleteLegacyANP(ns, name string) error
DeleteLegacyANP is a convenience function for deleting ANP by name and Namespace.
func (*KubernetesUtils) DeleteLegacyCG ¶
func (k *KubernetesUtils) DeleteLegacyCG(name string) error
DeleteLegacyCG is a convenience function for deleting legacy ClusterGroup by name.
func (*KubernetesUtils) DeleteLegacyTier ¶
func (k *KubernetesUtils) DeleteLegacyTier(name string) error
DeleteLegacyTier is a convenience function for deleting a legacy Antrea Policy Tier with specific name.
func (*KubernetesUtils) DeleteNetworkPolicy ¶
func (k *KubernetesUtils) DeleteNetworkPolicy(ns, name string) error
DeleteNetworkPolicy is a convenience function for deleting NetworkPolicy by name and Namespace.
func (*KubernetesUtils) DeleteService ¶
func (k *KubernetesUtils) DeleteService(ns, name string) error
DeleteService is a convenience function for deleting a Service by Namespace and name.
func (*KubernetesUtils) DeleteTier ¶
func (k *KubernetesUtils) DeleteTier(name string) error
DeleteTier is a convenience function for deleting an Antrea Policy Tier with specific name.
func (*KubernetesUtils) DeleteV1Alpha2CG ¶
func (k *KubernetesUtils) DeleteV1Alpha2CG(name string) error
DeleteV1Alpha2CG is a convenience function for deleting crd/v1alpha2 ClusterGroup by name.
func (*KubernetesUtils) DeleteV1Alpha3CG ¶
func (k *KubernetesUtils) DeleteV1Alpha3CG(name string) error
DeleteV1Alpha3CG is a convenience function for deleting core/v1alpha3 ClusterGroup by name.
func (*KubernetesUtils) GetACNP ¶
func (k *KubernetesUtils) GetACNP(name string) (*crdv1alpha1.ClusterNetworkPolicy, error)
GetACNP is a convenience function for getting AntreaClusterNetworkPolicies.
func (*KubernetesUtils) GetANP ¶
func (k *KubernetesUtils) GetANP(namespace, name string) (*crdv1alpha1.NetworkPolicy, error)
GetANP is a convenience function for getting AntreaNetworkPolicies.
func (*KubernetesUtils) GetCG ¶
func (k *KubernetesUtils) GetCG(name string) (*crdv1alpha2.ClusterGroup, error)
GetCG is a convenience function for getting ClusterGroups
func (*KubernetesUtils) GetNetworkPolicy ¶
func (k *KubernetesUtils) GetNetworkPolicy(namespace, name string) (*v1net.NetworkPolicy, error)
GetNetworkPolicy is a convenience function for getting k8s NetworkPolicies.
func (*KubernetesUtils) GetPodByLabel ¶
GetPodByLabel returns a Pod with the matching Namespace and "pod" label.
func (*KubernetesUtils) GetPodsByLabel ¶
GetPodsByLabel returns an array of all Pods in the given Namespace having a k/v label pair.
func (*KubernetesUtils) GetService ¶
func (k *KubernetesUtils) GetService(namespace, name string) (*v1.Service, error)
GetService is a convenience function for getting Service
func (*KubernetesUtils) GetTier ¶
func (k *KubernetesUtils) GetTier(name string) (*crdv1alpha1.Tier, error)
GetTier is a convenience function for getting Tier.
func (*KubernetesUtils) GetV1Alpha2CG ¶
func (k *KubernetesUtils) GetV1Alpha2CG(cgName string) (*crdv1alpha2.ClusterGroup, error)
func (*KubernetesUtils) GetV1Alpha3CG ¶
func (k *KubernetesUtils) GetV1Alpha3CG(cgName string) (*crdv1alpha3.ClusterGroup, error)
func (*KubernetesUtils) LegacyCleanup ¶
func (k *KubernetesUtils) LegacyCleanup(namespaces []string)
func (*KubernetesUtils) Probe ¶
func (k *KubernetesUtils) Probe(ns1, pod1, ns2, pod2 string, port int32, protocol v1.Protocol) (PodConnectivityMark, error)
Probe execs into a Pod and checks its connectivity to another Pod. Of course it assumes that the target Pod is serving on the input port, and also that agnhost is installed.
func (*KubernetesUtils) UpdateLegacyTier ¶
func (k *KubernetesUtils) UpdateLegacyTier(tier *legacysecv1alpha1.Tier) (*legacysecv1alpha1.Tier, error)
UpdateLegacyTier is a convenience function for updating a legacy Antrea Policy Tier.
func (*KubernetesUtils) UpdateTier ¶
func (k *KubernetesUtils) UpdateTier(tier *crdv1alpha1.Tier) (*crdv1alpha1.Tier, error)
UpdateTier is a convenience function for updating an Antrea Policy Tier.
func (*KubernetesUtils) Validate ¶
func (k *KubernetesUtils) Validate(allPods []Pod, reachability *Reachability, port int32, protocol v1.Protocol)
type PodConnectivityMark ¶
type PodConnectivityMark string
const ( Connected PodConnectivityMark = "Con" Unknown PodConnectivityMark = "Unk" Error PodConnectivityMark = "Err" Dropped PodConnectivityMark = "Drp" Rejected PodConnectivityMark = "Rej" )
type Reachability ¶
type Reachability struct { Expected *ConnectivityTable Observed *ConnectivityTable Pods []Pod PodsByNamespace map[string][]Pod }
func NewReachability ¶
func NewReachability(pods []Pod, defaultExpectation PodConnectivityMark) *Reachability
func (*Reachability) Expect ¶
func (r *Reachability) Expect(pod1 Pod, pod2 Pod, connectivity PodConnectivityMark)
func (*Reachability) ExpectAllEgress ¶
func (r *Reachability) ExpectAllEgress(pod Pod, connectivity PodConnectivityMark)
ExpectAllEgress defines that any traffic going out of the pod will be allowed/dropped/rejected
func (*Reachability) ExpectAllIngress ¶
func (r *Reachability) ExpectAllIngress(pod Pod, connectivity PodConnectivityMark)
ExpectAllIngress defines that any traffic going into the pod will be allowed/dropped/rejected
func (*Reachability) ExpectAllSelfNamespace ¶
func (r *Reachability) ExpectAllSelfNamespace(connectivity PodConnectivityMark)
func (*Reachability) ExpectConn ¶
func (r *Reachability) ExpectConn(spec *Connectivity)
ExpectConn is an experimental way to describe connectivity with named fields
func (*Reachability) ExpectEgressToNamespace ¶
func (r *Reachability) ExpectEgressToNamespace(pod Pod, namespace string, connectivity PodConnectivityMark)
func (*Reachability) ExpectIngressFromNamespace ¶
func (r *Reachability) ExpectIngressFromNamespace(pod Pod, namespace string, connectivity PodConnectivityMark)
func (*Reachability) ExpectSelf ¶
func (r *Reachability) ExpectSelf(allPods []Pod, connectivity PodConnectivityMark)
func (*Reachability) ExpectSelfNamespace ¶
func (r *Reachability) ExpectSelfNamespace(namespace string, connectivity PodConnectivityMark)
func (*Reachability) Observe ¶
func (r *Reachability) Observe(pod1 Pod, pod2 Pod, connectivity PodConnectivityMark)
func (*Reachability) PrintSummary ¶
func (r *Reachability) PrintSummary(printExpected bool, printObserved bool, printComparison bool)
func (*Reachability) Summary ¶
func (r *Reachability) Summary() (trueObs int, falseObs int, comparison *TruthTable)
type TestData ¶
type TestData struct {
// contains filtered or unexported fields
}
TestData stores the state required for each test case.
func (*TestData) GetAgentFeatures ¶
func (data *TestData) GetAgentFeatures(antreaNamespace string) (featuregate.FeatureGate, error)
func (*TestData) GetAntreaConfigMap ¶
func (*TestData) GetControllerFeatures ¶
func (data *TestData) GetControllerFeatures(antreaNamespace string) (featuregate.FeatureGate, error)
func (*TestData) GetEncapMode ¶
func (data *TestData) GetEncapMode() (config.TrafficEncapModeType, error)
func (*TestData) GetFlowAggregatorConfigMap ¶
type TestOptions ¶
type TestOptions struct {
// contains filtered or unexported fields
}
type TruthTable ¶
type TruthTable struct { Items []string Values map[string]map[string]bool // contains filtered or unexported fields }
func (*TruthTable) IsComplete ¶
func (tt *TruthTable) IsComplete() bool
IsComplete returns true if there's a value set for every single pair of items, otherwise it returns false.
func (*TruthTable) PrettyPrint ¶
func (tt *TruthTable) PrettyPrint(indent string) string