test: Use an API client to wait for the process to come up.

Signed-off-by: Blaž Hrastnik <blaz.hrast@gmail.com>