migrate integration tests and diagnostic funcs from cli

Change-Id: I73bae3f713b60beb92987649abfcf69dcce671f2
Merge "migrate integration tests and diagnostic funcs from cli"