Fix broken upgrade test cases