Documentation ¶
Overview ¶
Package testutil contains helper functions for component unit tests.
Index ¶
- func ConfigFromMap(t *testing.T, m map[string]string, k string) string
- func MatchJSONPathInt64Value(t *testing.T, yamlConfig string, jsonPath string, expected int64)
- func MatchJSONPathStringValue(t *testing.T, yamlConfig string, jsonPath string, expected string)
- func RenderManifests(t *testing.T, component components.Component, componentName string, ...) map[string]string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigFromMap ¶
ConfigFromMap takes a map and a key and returns the value associated with the key. If the key does not exist in that map, the function fails.
func MatchJSONPathInt64Value ¶ added in v0.6.1
MatchJSONPathInt64Value is a helper function for component unit tests. It compares the integer at a JSON path in a YAML config to the expected integer.
func MatchJSONPathStringValue ¶
MatchJSONPathStringValue is a helper function for component unit tests. It compares the string at a JSON path in a YAML config to the expected string.
func RenderManifests ¶
func RenderManifests( t *testing.T, component components.Component, componentName string, hclConfig string, ) map[string]string
RenderManifests converts a component into YAML manifests.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.