Finish master recovery
Add test infra