mocks

package
v0.0.0-...-3ca6529 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewJWKCertServerMock

func NewJWKCertServerMock(t *testing.T, pubKey crypto.PublicKey, jwkKID string, jwkAlg string) (url string, teardown func() error)

func NewMockServerTimeout

func NewMockServerTimeout(endpoint string, waitTime time.Duration) (*httptest.Server, func())

Returns a server that will wait waitTime when hit at endpoint

Types

type OCMAuthzValidatorMock

type OCMAuthzValidatorMock struct {
	Action       string
	ResourceType string
}

func NewOCMAuthzValidatorMockClient

func NewOCMAuthzValidatorMockClient() (*OCMAuthzValidatorMock, *ocm.Client)

func (*OCMAuthzValidatorMock) AccessReview

func (m *OCMAuthzValidatorMock) AccessReview(ctx context.Context, username, action, resourceType, organizationID, subscriptionID, clusterID string) (allowed bool, err error)

func (OCMAuthzValidatorMock) Reset

func (m OCMAuthzValidatorMock) Reset()

func (*OCMAuthzValidatorMock) SelfAccessReview

func (m *OCMAuthzValidatorMock) SelfAccessReview(ctx context.Context, action, resourceType, organizationID, subscriptionID, clusterID string) (allowed bool, err error)

Jump to

Keyboard shortcuts

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