mirror of
https://github.com/holos-run/holos.git
synced 2026-04-07 18:15:00 +00:00
Previously the test coverage for the holos show buildplans command was covered by testscript. This is a problem because it's difficult to do a structural comparison in testscript, we're limited to comparing stdout with a file. This patch refactors the test script to a go testing test using testify to compare structures instead of comparing text output as was done previously. In the process it became clear the holos show buildplans command is not injecting tag values properly. The component name, labels, and annotations were missing. This patch fixes that problem by passing the tags from the core Platform.Components element to the component.Component.BuildPlan method. Note, I'm not happy with how ad-hoc the tags have become to pass around. Ideally we'll refactor them into a proper protocol, passing the entire core.Component structure to the method that produces a build plan. The idea of passing this structure over standard intput to a build plan task worker keeps coming up over an over again.