Documentation ¶
Index ¶
- func PrintNetworkPolicy(p *networkingv1.NetworkPolicy) string
- type CombinedResults
- type Comparison
- type ComparisonTable
- func (c *ComparisonTable) Get(from string, to string) *Item
- func (c *ComparisonTable) RenderSuccessTable() string
- func (c *ComparisonTable) ResultsByProtocol() map[bool]map[v1.Protocol]int
- func (c *ComparisonTable) Set(from string, to string, value *Item)
- func (c *ComparisonTable) ValueCounts(ignoreLoopback bool) map[Comparison]int
- func (c *ComparisonTable) ValueCountsByProtocol(ignoreLoopback bool) map[v1.Protocol]map[Comparison]int
- type Interpreter
- type InterpreterConfig
- type Item
- type Printer
- type Result
- type StepResult
- type Summary
- type TestCaseState
- func (t *TestCaseState) CreateNamespace(ns string, labels map[string]string) error
- func (t *TestCaseState) CreatePod(ns string, pod string, labels map[string]string) error
- func (t *TestCaseState) CreatePolicy(policy *networkingv1.NetworkPolicy) error
- func (t *TestCaseState) DeleteNamespace(ns string) error
- func (t *TestCaseState) DeletePod(ns string, pod string) error
- func (t *TestCaseState) DeletePolicy(ns string, name string) error
- func (t *TestCaseState) ReadPolicies(namespaces []string) error
- func (t *TestCaseState) ResetClusterState() error
- func (t *TestCaseState) SetNamespaceLabels(ns string, labels map[string]string) error
- func (t *TestCaseState) SetPodLabels(ns string, pod string, labels map[string]string) error
- func (t *TestCaseState) UpdatePolicy(policy *networkingv1.NetworkPolicy) error
- func (t *TestCaseState) VerifyClusterState() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PrintNetworkPolicy ¶ added in v0.1.0
func PrintNetworkPolicy(p *networkingv1.NetworkPolicy) string
Types ¶
type CombinedResults ¶ added in v0.3.0
type CombinedResults struct {
Results []*Result
}
func (*CombinedResults) Summary ¶ added in v0.3.0
func (c *CombinedResults) Summary(ignoreLoopback bool) *Summary
type Comparison ¶ added in v0.2.0
type Comparison string
const ( SameComparison Comparison = "same" DifferentComparison Comparison = "different" IgnoredComparison Comparison = "ignored" )
func (Comparison) ShortString ¶ added in v0.2.0
func (c Comparison) ShortString() string
type ComparisonTable ¶ added in v0.2.0
type ComparisonTable struct {
Wrapped *probe.TruthTable
}
func NewComparisonTable ¶ added in v0.2.0
func NewComparisonTable(items []string) *ComparisonTable
func NewComparisonTableFrom ¶ added in v0.2.0
func NewComparisonTableFrom(kubeProbe *probe.Table, simulatedProbe *probe.Table) *ComparisonTable
func (*ComparisonTable) Get ¶ added in v0.2.0
func (c *ComparisonTable) Get(from string, to string) *Item
func (*ComparisonTable) RenderSuccessTable ¶ added in v0.2.4
func (c *ComparisonTable) RenderSuccessTable() string
func (*ComparisonTable) ResultsByProtocol ¶ added in v0.2.4
func (c *ComparisonTable) ResultsByProtocol() map[bool]map[v1.Protocol]int
func (*ComparisonTable) Set ¶ added in v0.2.0
func (c *ComparisonTable) Set(from string, to string, value *Item)
func (*ComparisonTable) ValueCounts ¶ added in v0.2.0
func (c *ComparisonTable) ValueCounts(ignoreLoopback bool) map[Comparison]int
func (*ComparisonTable) ValueCountsByProtocol ¶ added in v0.2.4
func (c *ComparisonTable) ValueCountsByProtocol(ignoreLoopback bool) map[v1.Protocol]map[Comparison]int
type Interpreter ¶ added in v0.1.0
type Interpreter struct {
// contains filtered or unexported fields
}
func NewInterpreter ¶ added in v0.1.0
func NewInterpreter(kubernetes kube.IKubernetes, resources *probe.Resources, config *InterpreterConfig) *Interpreter
func (*Interpreter) ExecuteTestCase ¶ added in v0.1.0
func (t *Interpreter) ExecuteTestCase(testCase *generator.TestCase) *Result
type InterpreterConfig ¶ added in v0.3.1
type Printer ¶ added in v0.1.0
func (*Printer) PrintStep ¶ added in v0.1.0
func (t *Printer) PrintStep(i int, step *generator.TestStep, stepResult *StepResult)
func (*Printer) PrintSummary ¶ added in v0.1.0
func (t *Printer) PrintSummary()
func (*Printer) PrintTestCaseResult ¶ added in v0.1.0
type Result ¶ added in v0.1.0
type StepResult ¶ added in v0.1.0
type StepResult struct { SimulatedProbe *probe.Table KubeProbes []*probe.Table Policy *matcher.Policy KubePolicies []*networkingv1.NetworkPolicy // contains filtered or unexported fields }
func NewStepResult ¶ added in v0.2.4
func NewStepResult(simulated *probe.Table, policy *matcher.Policy, kubePolicies []*networkingv1.NetworkPolicy) *StepResult
func (*StepResult) AddKubeProbe ¶ added in v0.2.4
func (s *StepResult) AddKubeProbe(kubeProbe *probe.Table)
func (*StepResult) Comparison ¶ added in v0.2.4
func (s *StepResult) Comparison(i int) *ComparisonTable
func (*StepResult) LastComparison ¶ added in v0.2.4
func (s *StepResult) LastComparison() *ComparisonTable
func (*StepResult) LastKubeProbe ¶ added in v0.2.0
func (s *StepResult) LastKubeProbe() *probe.Table
type TestCaseState ¶ added in v0.1.0
type TestCaseState struct { Kubernetes kube.IKubernetes Resources *probe.Resources Policies []*networkingv1.NetworkPolicy }
func (*TestCaseState) CreateNamespace ¶ added in v0.2.4
func (t *TestCaseState) CreateNamespace(ns string, labels map[string]string) error
func (*TestCaseState) CreatePolicy ¶ added in v0.1.0
func (t *TestCaseState) CreatePolicy(policy *networkingv1.NetworkPolicy) error
func (*TestCaseState) DeleteNamespace ¶ added in v0.2.4
func (t *TestCaseState) DeleteNamespace(ns string) error
func (*TestCaseState) DeletePod ¶ added in v0.2.4
func (t *TestCaseState) DeletePod(ns string, pod string) error
func (*TestCaseState) DeletePolicy ¶ added in v0.1.0
func (t *TestCaseState) DeletePolicy(ns string, name string) error
func (*TestCaseState) ReadPolicies ¶ added in v0.1.0
func (t *TestCaseState) ReadPolicies(namespaces []string) error
func (*TestCaseState) ResetClusterState ¶ added in v0.3.0
func (t *TestCaseState) ResetClusterState() error
func (*TestCaseState) SetNamespaceLabels ¶ added in v0.1.0
func (t *TestCaseState) SetNamespaceLabels(ns string, labels map[string]string) error
func (*TestCaseState) SetPodLabels ¶ added in v0.1.0
func (*TestCaseState) UpdatePolicy ¶ added in v0.1.0
func (t *TestCaseState) UpdatePolicy(policy *networkingv1.NetworkPolicy) error
func (*TestCaseState) VerifyClusterState ¶ added in v0.3.0
func (t *TestCaseState) VerifyClusterState() error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.