Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsExecution ¶ added in v1.3.0
IsExecution asserts executionError.
Types ¶
type Runner ¶
type Runner struct { OutputDir string T *testing.T TestFunc TestFunc TestFuncReturnsBytes bool Update bool // contains filtered or unexported fields }
Runner is used to run unit test for a specific resource. It does so by running TestFunc with different input and compare the result with expected outputs.
TestFunc is a function which takes the observed kubernetes object as input (e.g. AWSConfig) and returns another kubernetes object (e.g. Service).
OutputDir holds yaml files, representing the yaml version of the object returned by TestFunc. Files are mapped 1 to 1 from input to output directory. e.g. when a file called `foo` is placed in the input directory, a corresponding file named `foo` must be placed in the output directory.
Input directory is harcoded as the input directory in this package.