integration tests for rebuilding indexes