testsecrets

package
v0.1.67 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddVaultSecrets

func AddVaultSecrets(objects ...runtime.Object) []runtime.Object

func LoadExtSecretDir

func LoadExtSecretDir(t *testing.T, ns, dir string) []runtime.Object

LoadExtSecretDir loads the given YAML files in the given directory as external secrets for a test case

func LoadExtSecretFiles

func LoadExtSecretFiles(t *testing.T, ns string, fileNames ...string) []runtime.Object

LoadExtSecretFiles loads the given YAML files as external secrets for a test case

func NewFakeDynClient

func NewFakeDynClient(scheme *runtime.Scheme, dynObjects ...runtime.Object) *dynfake.FakeDynamicClient

NewFakeDynClient creates a new dynamic client with the external secrets

Types

type FakeVaultSecrets

type FakeVaultSecrets struct {
	Objects map[string]map[string]string
}

func LoadFakeVaultSecrets

func LoadFakeVaultSecrets(t *testing.T, cmds []*cmdrunner.Command, vaultBin string) FakeVaultSecrets

func (*FakeVaultSecrets) AssertHasValue

func (s *FakeVaultSecrets) AssertHasValue(t *testing.T, objectName, propertyName string) string

AssertHasValue asserts the given property has a value populated

func (*FakeVaultSecrets) AssertValueEquals

func (s *FakeVaultSecrets) AssertValueEquals(t *testing.T, objectName, propertyName, expectedValue string)

AssertValueEquals asserts the given property value

Jump to

Keyboard shortcuts

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