From b1d62f44a027fd53a53278803789ba2b4a95ee04 Mon Sep 17 00:00:00 2001 From: The412Banner <205237651+The412Banner@users.noreply.github.com> Date: Fri, 20 Nov 2026 18:14:28 +0000 Subject: [PATCH] test(rockstar): GTA IV and L.A. Noire without the SDK also fetch the Social Club installer --- tools/tests/test_store_launch_rockstar.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/tools/tests/test_store_launch_rockstar.py b/tools/tests/test_store_launch_rockstar.py index 427a992f4b..f26823686d 100644 --- a/tools/tests/test_store_launch_rockstar.py +++ b/tools/tests/test_store_launch_rockstar.py @@ -234,9 +234,9 @@ class RockstarLaunch(unittest.TestCase): self.assertEqual('ready', result) self.assertEqual([False], stale) - def sdk_launch(self, root, runtimes, sdk_answer=None, ships_runtime=False): + def sdk_launch(self, root, runtimes, sdk_answer=None, ships_runtime=False, ident='gta5'): folder, sidecar, prefix, service, answer = self.setup_game(root) - sidecar['id'] = 'gta5' + sidecar['id'] = ident (folder / 'title.rgl').write_bytes(b'RGLM' + bytes(108)) if ships_runtime: (folder / 'socialclub.dll').write_bytes(b'game-runtime') @@ -261,6 +261,15 @@ class RockstarLaunch(unittest.TestCase): self.assertIn('rockstar runtime: installed', lines) self.assertEqual([], states) + def test_classic_sdk_titles_without_a_social_club_installer_also_get_one_from_the_app(self): + for ident in ('gta4', 'lanoire'): + with self.subTest(ident=ident), tempfile.TemporaryDirectory() as root: + result, requests, lines, states = self.sdk_launch(root, ['game-runtime', 'installed'], {'ok': True}, ident=ident) + self.assertEqual('ready', result) + self.assertEqual(['rockstar-sdk', 'rockstar-launch'], requests) + self.assertIn('rockstar runtime: installed', lines) + self.assertEqual([], states) + def test_an_unavailable_social_club_installer_is_logged_and_the_launch_continues(self): for sdk_answer, reason in (({'ok': False, 'reason': 'no-launcher-build'}, 'sdk-no-launcher-build'), (None, 'sdk-timeout')): with self.subTest(reason=reason), tempfile.TemporaryDirectory() as root: @@ -277,7 +286,7 @@ class RockstarLaunch(unittest.TestCase): self.assertEqual(['rockstar-launch'], requests) self.assertIn('rockstar runtime: ' + runtimes[0], lines) - def test_classic_titles_never_ask_for_the_social_club_installer(self): + def test_classic_titles_without_the_sdk_never_ask_for_the_social_club_installer(self): with tempfile.TemporaryDirectory() as root: with patch.object(store, 'rockstar_runtime') as runtime: result, _, requests = self.prepare(root)