Documentation ¶
Index ¶
- func CleanTempTestFiles(t *testing.T, temp string)
- func CompareGraphOutputAsSets(expected, produced string) bool
- func ExecuteCommand(root *cobra.Command, args ...string) (output string, err error)
- func GetAllLogs(logs []*logrus.Entry) (entries []string)
- func PrepareRealFilesForTest(t *testing.T) (string, string, string)
- func PrepareTwoRealConstellationFilesForTest(t *testing.T) (string, string, string, string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CleanTempTestFiles ¶
CleanTempTestFiles removes a specific folder and all its contents from disk
func CompareGraphOutputAsSets ¶
CompareGraphOutputAsSets - the graphviz library does not always output the result string with nodes and edges in the same order (it can vary between calls). This does not impact using the result but makes testing the result a headache as the assumption is that the expected string and the produced string would match exactly. When the sequence changes they dont match. This function converts the strings into sets of lines and compares if the lines in the two outputs are the same
func ExecuteCommand ¶
ExecuteCommand is used to run a cobra command with arguments and return its value and error
func GetAllLogs ¶
GetAllLogs loops through logrus entries and returns messages as []string
func PrepareRealFilesForTest ¶
PrepareRealFilesForTest creates a new temporary folder with new map and constellation files. Returns path to new temp folder
Types ¶
This section is empty.