Documentation ¶
Index ¶
- func SetIAM(i IdentityAccessManagement)
- type IAM
- func (i *IAM) AzureIdentityBindingExists(namespace, aibName string) (bool, error)
- func (i *IAM) AzureIdentityExists(namespace, aiName string) (bool, error)
- func (i *IAM) CreateAIB(useDefaultNS bool, aibName, aiName string) error
- func (i *IAM) CreateIAMProbePod(y []byte, useDefaultNS bool, aibName string, probe *summary.Probe) (*apiv1.Pod, error)
- func (i *IAM) DeleteIAMProbePod(n string, useDefaultNS bool, e string) error
- func (i *IAM) ExecuteVerificationCmd(pn string, cmd IAMProbeCommand, useDefaultNS bool) (*kubernetes.CmdExecutionResult, error)
- func (i *IAM) GetAccessToken(pn string, useDefaultNS bool) (*string, error)
- type IAMProbeCommand
- type IdentityAccessManagement
- type ProbeStruct
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetIAM ¶
func SetIAM(i IdentityAccessManagement)
SetIAM allows injection of an IdentityAccessManagement helper.
Types ¶
type IAM ¶
type IAM struct {
// contains filtered or unexported fields
}
IAM implements the IdentityAccessManagement interface.
func NewDefaultIAM ¶
func NewDefaultIAM() *IAM
NewDefaultIAM creates a new IAM instance using the default kubernetes provider.
func (*IAM) AzureIdentityBindingExists ¶
AzureIdentityBindingExists gets the AzureIdentityBindings and filter for namespace (if supplied)
func (*IAM) AzureIdentityExists ¶
AzureIdentityExists gets the AzureIdentityBindings and filter for namespace (if supplied)
func (*IAM) CreateIAMProbePod ¶
func (i *IAM) CreateIAMProbePod(y []byte, useDefaultNS bool, aibName string, probe *summary.Probe) (*apiv1.Pod, error)
CreateIAMProbePod creates a pod configured for IAM test cases.
func (*IAM) DeleteIAMProbePod ¶
DeleteIAMProbePod deletes the IAM test pod with the supplied name.
func (*IAM) ExecuteVerificationCmd ¶
func (i *IAM) ExecuteVerificationCmd(pn string, cmd IAMProbeCommand, useDefaultNS bool) (*kubernetes.CmdExecutionResult, error)
ExecuteVerificationCmd executes a verification command against the supplied pod name.
type IAMProbeCommand ¶
type IAMProbeCommand int
IAMProbeCommand defines commands for use in testing IAM
const ( CatAzJSON IAMProbeCommand = iota CurlAuthToken )
enum supporting IAMProbeCommand
func (IAMProbeCommand) String ¶
func (c IAMProbeCommand) String() string
type IdentityAccessManagement ¶
type IdentityAccessManagement interface { AzureIdentityExists(namespace, aiName string) (bool, error) AzureIdentityBindingExists(namespace, aibName string) (bool, error) CreateAIB(useDefaultNS bool, aibName, aiName string) error CreateIAMProbePod(y []byte, useDefaultNS bool, aibName string, probe *summary.Probe) (*apiv1.Pod, error) DeleteIAMProbePod(n string, useDefaultNS bool, e string) error ExecuteVerificationCmd(pn string, cmd IAMProbeCommand, useDefaultNS bool) (*kubernetes.CmdExecutionResult, error) GetAccessToken(pn string, useDefaultNS bool) (*string, error) }
IdentityAccessManagement encapsulates functionality for querying and probing Identity and Access Management setup.
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)
ScenarioInitialize 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.