| Index: client/tests/run_isolated_test.py
|
| diff --git a/client/tests/run_isolated_test.py b/client/tests/run_isolated_test.py
|
| index a58e1261721b8387ae6eeadfb469c68b11f4ec52..a24d0cc419e8cd7a6f861f6443fc0146c58f4c6d 100755
|
| --- a/client/tests/run_isolated_test.py
|
| +++ b/client/tests/run_isolated_test.py
|
| @@ -428,7 +428,13 @@ class RunIsolatedTest(RunIsolatedTestBase):
|
| return 0
|
|
|
| self.popen_mocks.append(fake_ensure)
|
| + self._fake_isolated_cache = {}
|
| + self.mock(cipd.CipdClient, '_ensure_from_isolate',
|
| + self.fake_ensure_from_isolate)
|
| + self.mock(cipd.CipdClient, '_isolate_cipd', self.fake_isolate_cipd)
|
| +
|
| cipd_cache = os.path.join(self.tempdir, 'cipd_cache')
|
| +
|
| cmd = [
|
| '--no-log',
|
| '--cache', os.path.join(self.tempdir, 'cache'),
|
| @@ -478,6 +484,16 @@ class RunIsolatedTest(RunIsolatedTestBase):
|
| echo_cmd[0])
|
| self.assertEqual(echo_cmd[1:], ['hello', 'world'])
|
|
|
| + def fake_ensure_from_isolate(self, target_dir, cipd_isolated, isolate_cache):
|
| + # Not seen first time, then seen all other times
|
| + if cipd_isolated not in self._fake_isolated_cache:
|
| + self._fake_isolated_cache[cipd_isolated] = True
|
| + return False
|
| + return True
|
| +
|
| + def fake_isolate_cipd(self, root, pkgs, isolate_cache, cipd_cache):
|
| + pass
|
| +
|
| def test_main_naked_with_cipd_client_no_packages(self):
|
| cipd_cache = os.path.join(self.tempdir, 'cipd_cache')
|
| cmd = [
|
|
|