Move some more tests to integration cli

Also I wrote some functions for build testing