Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddSchemaAnnotations ¶
AddSchemaAnnotations adds the schema annotation to the external secret Unstructured objects
func AssertValidJSON ¶
AssertValidJSON asserts that the given text is valid JSON
func AssertValidXML ¶
AssertValidXML asserts that the given text is valid XML
Types ¶
type ExternalSecret ¶
type ExternalSecret struct { Location string Name string Value secretstore.SecretValue ExternalSecret v1.ExternalSecret }
type Runner ¶
type Runner struct { // TestCases the test cases to run TestCases []TestCase // SchemaFile the schema file to load for the templates SchemaFile string // Namespace optional namespace - defaults to 'jx' Namespace string // Dir the directory used to detect the jx-requirements.yml file if none is supplied on the test case Dir string // KubeObjects so you can define default secrets KubeObjects []runtime.Object }
Runner runs the test harness
type TestCase ¶
type TestCase struct { // GenerateTestOutput to regenerate the expected output GenerateTestOutput bool // ObjectName name of the object in the schema ObjectName string // Property name to render; this name is used to find the template in the schema Property string // TestName is the name of the test TestName string // ExpectedFile expected file name to compare the generated results against ExpectedFile string // Format the text format of the output used to perform additional validation Format string // Dir the directory used to detect the jx-requirements.yml file if none is supplied Dir string // Requirements the jx-requirements.yml used to parameterize the template Requirements *jxcore.RequirementsConfig // KubeObjects extra kubernetes resources such as Secrets for the test case KubeObjects []runtime.Object // VerifyFn performs a custom verify of the generated value VerifyFn func(*testing.T, string) ExternalSecrets []ExternalSecret ExternalSecretStorageType secretstore.SecretStoreType // Secret is the underlying secret for the first external secret if using Populate loop testing Secret *corev1.Secret }
TestCase represents a test case
Click to show internal directories.
Click to hide internal directories.