cases

package
v0.0.0-...-e1628ab Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 16, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package cases contain e2e cases for verification everoute security function. Cases consist of different scenarios, a scenario usually like:

Context("A basic test scenario", func() {
  BeforeEach("Create needed endpoints and groups")
  When("Creating policies for some purpose", func() {
    BeforeEach("Create needed policies")
    It("Check flows on agent, and verify reachable between endpoints")
    When("Verify special cases, e.g. migrate, renew ip, update labels")
  })
})

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SecurityModel

type SecurityModel struct {
	Policies  []*securityv1alpha1.SecurityPolicy
	Endpoints []*model.Endpoint
}

func (*SecurityModel) ExpectedRelativeFlows

func (m *SecurityModel) ExpectedRelativeFlows() map[string][]string

ExpectedRelativeFlows compute only expected open flows which relative with per endpoint by security model. It returns a map from a host name to some flows, and asserts the host name is same as the agent name.

func (*SecurityModel) NewEmptyTruthTable

func (m *SecurityModel) NewEmptyTruthTable(defaultExpectation bool) *model.TruthTable

NewEmptyTruthTable returned endpoint TruthTable with defaultExpectation. It could used to build expected TruthTable.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL