mirror of
https://gitea.com/actions/setup-python.git
synced 2026-10-15 01:57:02 +00:00
Add error handling for saving and restoring cache (#618)
This commit is contained in:
1 parent
b41aaf9f0c
commit
03eb867e3d
8 files changed
+694
-1056
No files matched your search
@@ -225,7 +225,7 @@ describe('run', () => {
|
||||
expect(setFailedSpy).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('saves with error from toolkit, should fail workflow', async () => {
|
||||
it('saves with error from toolkit, should not fail the workflow', async () => {
|
||||
inputs['cache'] = 'npm';
|
||||
getStateSpy.mockImplementation((name: string) => {
|
||||
if (name === State.STATE_CACHE_PRIMARY_KEY) {
|
||||
@@ -247,7 +247,7 @@ describe('run', () => {
|
||||
expect(getStateSpy).toHaveBeenCalledTimes(3);
|
||||
expect(infoSpy).not.toHaveBeenCalledWith();
|
||||
expect(saveCacheSpy).toHaveBeenCalled();
|
||||
expect(setFailedSpy).toHaveBeenCalled();
|
||||
expect(setFailedSpy).not.toHaveBeenCalled();
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user