core: integration tests for init.
core: integration tests for init.

Using the tmpdir helpers introduced last commit.  So far so good.

We're intentionally disregarding all the stdout and stderr outputs.  It is good and correct to be able to tell whether or not It Did The Thing based on the exit code alone: after all, that's what third-party scripters or integrations should be able to get by on.

The dummy UI object is likely a code smell.  Refactoring the core commands to get that to move one level out (back up to the cmd main package) is probably desirable in the future.

Returning exit code ints at this scale turns out to be an unfortunate thing, because our test system prints them as ints!  Not wrong, but not handy for human comprehension when things fail.  Debating if this should be fixed by adding a stringer method to the ExitCode typedef, or, switching the entire core package to return a stringish errcat-style enum of errors (and moving the mapping to exit code ints to the main command pkg).

Signed-off-by: Eric Myhre <2346ad27d7568ba9896f1b7da6b5991251debdf2@exultant.us>

polydawn/hitch,polydawn/hitch