CLOUDIFY-1659 merged tests from deploy-api branch