main: add basic functional test

wait on #1315 
move the helper function to the end of the file?
this should be replaced by the etcd client inside etcd codebase. add a todo?