Fix keep_deployments handling in deploy tests