container_registry_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: 8 Imported by: 0

Documentation

Overview

Package container_registry_access provides the implementation required to execute the feature based test cases described in the the 'events' directory.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetContainerRegistryAccess

func SetContainerRegistryAccess(c ContainerRegistryAccess)

SetContainerRegistryAccess allows injection of ContainerRegistryAccess helper.

Types

type CRA

type CRA struct {
	// contains filtered or unexported fields
}

CRA implements the ContainerRegistryAccess interface.

func NewCRA

func NewCRA(k kubernetes.Kubernetes) *CRA

NewCRA creates a new CRA with the supplied kubernetes instance.

func NewDefaultCRA

func NewDefaultCRA() *CRA

NewDefaultCRA creates a new CRA using the default kubernetes instance.

func (*CRA) ClusterIsDeployed

func (c *CRA) ClusterIsDeployed() *bool

ClusterIsDeployed verifies if a cluster is deployed.

func (*CRA) SetupContainerAccessProbePod

func (c *CRA) SetupContainerAccessProbePod(r string, probe *summary.Probe) (*apiv1.Pod, *kubernetes.PodAudit, error)

SetupContainerAccessProbePod creates a pod with characteristics required for testing container access.

func (*CRA) TeardownContainerAccessProbePod

func (c *CRA) TeardownContainerAccessProbePod(p string, e string) error

TeardownContainerAccessProbePod deletes the supplied test pod in the container registry access namespace.

type ContainerRegistryAccess

type ContainerRegistryAccess interface {
	ClusterIsDeployed() *bool
	SetupContainerAccessProbePod(r string, probe *summary.Probe) (*apiv1.Pod, *kubernetes.PodAudit, error)
	TeardownContainerAccessProbePod(p string, e string) error
}

ContainerRegistryAccess interface defines the methods to support container registry 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)

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

craScenarioInitialize 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