Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExecuteTestCases ¶
func ExecuteTestCases(t *testing.T, testCases []Case, collectionName string, newRemoveCmdToTest func(filesys.FileSystem) *cobra.Command)
ExecuteTestCases executes the provided test cases against the specified command for a particular collection (e.g. ) tests a command defined by the provided collection Name (e.g. transformers or resources) and newRemoveCmdToTest function.
Types ¶
type Case ¶
type Case struct { // Description is the description of the test case. Description string // Given is the provided inputs for the test case. Given Given // Expected is the expected outputs for the test case. Expected Expected }
Case represents a test case to execute.
type Expected ¶
type Expected struct { // Expected is the collection of expected output items. Items []string // Deleted is the collection of expected Deleted items (if any). Deleted []string // Err represents the error that is expected in the output (if any). Err error }
Expected represents the expected outputs of the test case.
Click to show internal directories.
Click to hide internal directories.