Documentation

Overview

Package testutil contains helper functions for component unit tests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigFromMap

func ConfigFromMap(t *testing.T, m map[string]string, k string) string

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 MatchJSONPathStringValue

func MatchJSONPathStringValue(t *testing.T, yamlConfig string, jsonPath string, expected string)

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.