Mock always getLinuxOS

This commit is contained in:
panticmilos 2022-07-18 15:13:38 +02:00
parent 3aec06c05e
commit bdfd06e951

View File

@ -114,16 +114,14 @@ virtualenvs.path = "{cache-dir}/virtualenvs" # /Users/patrick/Library/Caches/py
dependencyFile
);
computeKeysSpy.mockImplementation(() => Promise.resolve('Ubuntu-20.4'));
if (process.env['RUNNER_OS'] === 'linux') {
Object.defineProperty(utils, 'IS_LINUX', {
value: () => {
jest.fn().mockReturnValue(true);
}
});
computeKeysSpy.mockImplementation(() =>
Promise.resolve('Ubuntu-20.4')
);
}
await cacheDistributor.restoreCache();