* Create states to emulate a successful restore process.
()
| 484 | * Create states to emulate a successful restore process. |
| 485 | */ |
| 486 | function createStateForSuccessfulRestore() { |
| 487 | jest.spyOn(core, 'getState').mockImplementation(name => { |
| 488 | switch (name) { |
| 489 | case 'cache-primary-key': |
| 490 | return 'setup-java-cache-primary-key'; |
| 491 | case 'cache-matched-key': |
| 492 | return 'setup-java-cache-matched-key'; |
| 493 | default: |
| 494 | return ''; |
| 495 | } |
| 496 | }); |
| 497 | } |
| 498 | |
| 499 | function createFile(path: string) { |
| 500 | core.info(`created a file at ${path}`); |