Flags are knobs that control the output generated by this generator. The flags also have a default value. Currently we (try to) have unit tests around each scenario the bootstrap generator could be likely used for. However we do not have a test case around what the config that is outputted when there are no flag values being passed.
I tried to see if there was a clean way of testing main(), however since the output is either written to stdout or to a file and since there are APIs calls being made (like for eg to the metadata server), This approach uses flag.Parse() to get the args into variables. However with this approach we are forcing a mechanism to update this test whenever there is an update the flags.
Flags are knobs that control the output generated by this generator. The flags also have a default value. Currently we (try to) have unit tests around each scenario the bootstrap generator could be likely used for. However we do not have a test case around what the config that is outputted when there are no flag values being passed.
I tried to see if there was a clean way of testing main(), however since the output is either written to stdout or to a file and since there are APIs calls being made (like for eg to the metadata server), This approach uses
flag.Parse()
to get the args into variables. However with this approach we are forcing a mechanism to update this test whenever there is an update the flags.