internet_access

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

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) AccessURL

func (n *NA) AccessURL(pn *string, url *string) (int, error)

AccessURL calls the supplied URL and returns the http code

func (*NA) ClusterIsDeployed

func (n *NA) ClusterIsDeployed() *bool

ClusterIsDeployed verifies if a suitable cluster is deployed.

func (*NA) SetupNetworkAccessProbePod

func (n *NA) SetupNetworkAccessProbePod(probe *summary.Probe) (*apiv1.Pod, *kubernetes.PodAudit, error)

SetupNetworkAccessProbePod creates a pod with characteristics required for testing network access.

func (*NA) TeardownNetworkAccessProbePod

func (n *NA) TeardownNetworkAccessProbePod(p string, e string) error

TeardownNetworkAccessProbePod deletes the test pod with the given name.

type NetworkAccess

type NetworkAccess interface {
	ClusterIsDeployed() *bool
	SetupNetworkAccessProbePod(probe *summary.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.

Jump to

Keyboard shortcuts

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