1
0
Fork 0
mirror of https://code.forgejo.org/actions/setup-python synced 2025-06-08 04:18:19 +02:00

Add error handling for saving and restoring cache (#618)

This commit is contained in:
Dmitry Shibanov 2023-03-10 12:15:18 +01:00 committed by GitHub
parent b41aaf9f0c
commit 03eb867e3d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 694 additions and 1056 deletions

View file

@ -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();
});
});