configmapsecret_test

package
v5.4.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetupEditSetConfigMapSecretTest

func SetupEditSetConfigMapSecretTest(
	t *testing.T,
	command func(filesys.FileSystem, ifc.KvLoader, *resource.Factory) *cobra.Command,
	input string,
	args []string,
) (*types.Kustomization, error)

Types

type FailureCase

type FailureCase struct {
	// The name of the test case
	Name string

	// The kustomization file content for the test case in YAML format
	KustomizationFileContent string

	// Arguments passed to the test case command
	Args []string

	// The expected error message for the test case
	ExpectedErrorMsg string
}

FailureCase specifies a test case for a failure in the 'edit set configmap'/'edit set secret' commands.

type SuccessCase

type SuccessCase struct {
	// The name of the test case
	Name string

	// The kustomization file content for the test case in YAML format
	KustomizationFileContent string

	// Arguments passed to the test case command
	Args []string

	// List of expected literals for the result of the test case
	ExpectedLiterals []string

	// The expected namespace for the result of the test case
	ExpectedNamespace string
}

SuccessCase specifies a test case for a success in the 'edit set configmap'/'edit set secret' commands.

Jump to

Keyboard shortcuts

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