Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TestDirectory ¶
func TestDirectory(t *testing.T, folderPath string, sourceSuffix string, loadFlowConfig bool, extraArgs []string, convert func(in []byte, extraArgs []string) ([]byte, diag.Diagnostics))
TestDirectory will execute tests for converting from a source configuration file to a flow configuration file for all files in a provided folder path.
For each file in the folderPath which ends with the sourceSuffix:
- Execute the convert func on the content of each file.
- Remove an Info diags from the results of calling convert in step 1.
- If the current filename.sourceSuffix has a matching filename.diags, read the contents of filename.diags and validate that they match in order with the diags from step 2.
- If the current filename.sourceSuffix has a matching filename.river, read the contents of filename.river and validate that they match the river configuration generated by calling convert in step 1.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.