mirror of
https://code.forgejo.org/actions/setup-node.git
synced 2025-06-18 09:31:11 +00:00
Show warning instead of failure when cache is not reachable
This commit is contained in:
parent
eeb10cff27
commit
dfc4b745b4
4 changed files with 13 additions and 6 deletions
|
@ -46,7 +46,8 @@ describe('cache-utils', () => {
|
|||
isFeatureAvailable.mockImplementation(() => false);
|
||||
process.env['GITHUB_SERVER_URL'] = 'https://www.test.com';
|
||||
|
||||
expect(() => isCacheFeatureAvailable()).toThrowError(
|
||||
isCacheFeatureAvailable();
|
||||
expect(warningSpy).toHaveBeenCalledWith(
|
||||
'Cache action is only supported on GHES version >= 3.5. If you are on version >=3.5 Please check with GHES admin if Actions cache service is enabled or not.'
|
||||
);
|
||||
});
|
||||
|
|
|
@ -644,8 +644,8 @@ describe('setup-node', () => {
|
|||
|
||||
await main.run();
|
||||
|
||||
expect(cnSpy).toHaveBeenCalledWith(
|
||||
`::error::Cache action is only supported on GHES version >= 3.5. If you are on version >=3.5 Please check with GHES admin if Actions cache service is enabled or not.${osm.EOL}`
|
||||
expect(warningSpy).toHaveBeenCalledWith(
|
||||
'Cache action is only supported on GHES version >= 3.5. If you are on version >=3.5 Please check with GHES admin if Actions cache service is enabled or not.'
|
||||
);
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue