mirror of
https://github.com/holos-run/holos.git
synced 2026-03-20 01:04:59 +00:00
This patch adds basic test data to run integration level tests on the holos cli command. Tests are structured similar to how the go and cue maintainers test their own cli tools using the testscripts package. Fixture data is loaded into a fake kubernetes.Clientset. The holos root command is executed without using a full sub-process so the fake kubernetes interface persists across multiple holos commands in the same test case. The fake kubernetes interface is reset after the testcase script concludes and a new one starts. Take care to read and write absolute paths from the test scripts, the current working directory of the test runner is not set to $WORK when executing the custom holos command.