Documentation ¶
Index ¶
- func GetSyntheticResources(kubernetes *kube.Kubernetes, kubeResources *connectivitykube.Resources) (*synthetic.Resources, error)
- func PrintNetworkPolicy(p *networkingv1.NetworkPolicy) string
- func SetupCluster(kubernetes *kube.Kubernetes, kubeResources *connectivitykube.Resources) error
- func SetupClusterTODODelete(kubernetes *kube.Kubernetes, namespaces []string, pods []string, port int, ...) (*connectivitykube.Resources, *synthetic.Resources, error)
- type Interpreter
- type MultipleContextTestCase
- type MultipleContextTestCasePrinter
- type MultipleContextTestCaseResult
- type MultipleContextTester
- type Printer
- type Result
- type StepResult
- type TestCaseState
- func (t *TestCaseState) CreatePolicy(policy *networkingv1.NetworkPolicy) error
- func (t *TestCaseState) DeletePolicy(ns string, name string) error
- func (t *TestCaseState) ReadPolicies(namespaces []string) 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
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetSyntheticResources ¶ added in v0.1.0
func GetSyntheticResources(kubernetes *kube.Kubernetes, kubeResources *connectivitykube.Resources) (*synthetic.Resources, error)
func PrintNetworkPolicy ¶ added in v0.1.0
func PrintNetworkPolicy(p *networkingv1.NetworkPolicy) string
func SetupCluster ¶
func SetupCluster(kubernetes *kube.Kubernetes, kubeResources *connectivitykube.Resources) error
func SetupClusterTODODelete ¶ added in v0.1.0
Types ¶
type Interpreter ¶ added in v0.1.0
type Interpreter struct {
// contains filtered or unexported fields
}
func NewInterpreter ¶ added in v0.1.0
func (*Interpreter) ExecuteTestCase ¶ added in v0.1.0
func (t *Interpreter) ExecuteTestCase(testCase *generator.TestCase) *Result
type MultipleContextTestCase ¶ added in v0.1.0
type MultipleContextTestCase struct { KubePolicies []*networkingv1.NetworkPolicy NetpolCreationWaitSeconds int Port int Protocol v1.Protocol KubeClients map[string]*kube.Kubernetes KubeResources map[string]*connectivitykube.Resources SyntheticResources *synthetic.Resources NamespacesToClean []string Policy *matcher.Policy }
type MultipleContextTestCasePrinter ¶ added in v0.1.0
type MultipleContextTestCasePrinter struct { Noisy bool IgnoreLoopback bool Contexts []string DifferenceCounts [][]int }
func (*MultipleContextTestCasePrinter) PrintFinish ¶ added in v0.1.0
func (t *MultipleContextTestCasePrinter) PrintFinish()
func (*MultipleContextTestCasePrinter) PrintTestCaseResult ¶ added in v0.1.0
func (t *MultipleContextTestCasePrinter) PrintTestCaseResult(result *MultipleContextTestCaseResult)
type MultipleContextTestCaseResult ¶ added in v0.1.0
type MultipleContextTestCaseResult struct { TestCase *MultipleContextTestCase SyntheticResult *synthetic.Result KubeResults map[string]*connectivitykube.Results Errors []error }
type MultipleContextTester ¶ added in v0.1.0
type MultipleContextTester struct{}
func NewMultipleContextTester ¶ added in v0.1.0
func NewMultipleContextTester() *MultipleContextTester
func (*MultipleContextTester) TestNetworkPolicy ¶ added in v0.1.0
func (t *MultipleContextTester) TestNetworkPolicy(testCase *MultipleContextTestCase) *MultipleContextTestCaseResult
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 Result struct { TestCase *generator.TestCase Steps []*StepResult Err error }
type StepResult ¶ added in v0.1.0
type StepResult struct { SyntheticResult *synthetic.Result KubeResults []*connectivitykube.Results Policy *matcher.Policy KubePolicies []*networkingv1.NetworkPolicy }
func (*StepResult) LastKubeResult ¶ added in v0.1.0
func (s *StepResult) LastKubeResult() *connectivitykube.Results
type TestCaseState ¶ added in v0.1.0
type TestCaseState struct { Kubernetes *kube.Kubernetes Resources *synthetic.Resources Policies []*networkingv1.NetworkPolicy }
func (*TestCaseState) CreatePolicy ¶ added in v0.1.0
func (t *TestCaseState) CreatePolicy(policy *networkingv1.NetworkPolicy) 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) 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
Source Files ¶
Click to show internal directories.
Click to hide internal directories.