Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetNetworkAccess ¶
func SetNetworkAccess(n NetworkAccess)
SetNetworkAccess allows injection of a specific NetworkAccess helper.
Types ¶
type NA ¶
type NA struct {
// contains filtered or unexported fields
}
NA implements NetworkAccess.
func NewDefaultNA ¶
func NewDefaultNA() *NA
NewDefaultNA creates a new instance of NA using the default kubernetes instance.
func NewNA ¶
func NewNA(k kubernetes.Kubernetes) *NA
NewNA creates a new instance of NA with the supplied kubernetes instance.
func (*NA) ClusterIsDeployed ¶
ClusterIsDeployed verifies if a suitable cluster is deployed.
func (*NA) SetupNetworkAccessProbePod ¶
func (n *NA) SetupNetworkAccessProbePod(probe *audit.Probe) (*apiv1.Pod, *kubernetes.PodAudit, error)
SetupNetworkAccessProbePod creates a pod with characteristics required for testing network access.
type NetworkAccess ¶
type NetworkAccess interface { ClusterIsDeployed() *bool SetupNetworkAccessProbePod(probe *audit.Probe) (*apiv1.Pod, *kubernetes.PodAudit, error) TeardownNetworkAccessProbePod(p string, e string) error AccessURL(pn *string, url *string) (int, error) }
NetworkAccess defines functionality for supporting Network Access tests.
type ProbeStruct ¶
type ProbeStruct struct{}
var Probe ProbeStruct
func (ProbeStruct) Name ¶
func (p ProbeStruct) Name() string
func (ProbeStruct) Path ¶ added in v0.5.0
func (p ProbeStruct) Path() string
func (ProbeStruct) ProbeInitialize ¶
func (p ProbeStruct) ProbeInitialize(ctx *godog.TestSuiteContext)
iaProbeInitialize handles any overall Test Suite initialisation steps. This is registered with the test handler as part of the init() function.
func (ProbeStruct) ScenarioInitialize ¶
func (p ProbeStruct) ScenarioInitialize(ctx *godog.ScenarioContext)
iaScenarioInitialize initialises the specific test steps. This is essentially the creation of the test which reflects the tests described in the events directory. There must be a test step registered for each line in the feature files. Note: Godog will output stub steps and implementations if it doesn't find a step / function defined. See: https://github.com/cucumber/godog#example.