mirror of
				https://github.com/actions/cache.git
				synced 2025-11-04 03:04:01 +00:00 
			
		
		
		
	Merge cdaf92f3ce69c386a7aae843567f0daf27942e71 into ac25611caef967612169ab7e95533cf932c32270
This commit is contained in:
		
						commit
						c6f3195bc6
					
				@ -205,6 +205,7 @@ test("restore with no cache found", async () => {
 | 
				
			|||||||
        key
 | 
					        key
 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    const setCacheHitOutputMock = jest.spyOn(actionUtils, "setCacheHitOutput");
 | 
				
			||||||
    const infoMock = jest.spyOn(core, "info");
 | 
					    const infoMock = jest.spyOn(core, "info");
 | 
				
			||||||
    const failedMock = jest.spyOn(core, "setFailed");
 | 
					    const failedMock = jest.spyOn(core, "setFailed");
 | 
				
			||||||
    const stateMock = jest.spyOn(core, "saveState");
 | 
					    const stateMock = jest.spyOn(core, "saveState");
 | 
				
			||||||
@ -216,6 +217,9 @@ test("restore with no cache found", async () => {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    await run();
 | 
					    await run();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    expect(setCacheHitOutputMock).toHaveBeenCalledTimes(1);
 | 
				
			||||||
 | 
					    expect(setCacheHitOutputMock).toHaveBeenCalledWith(false);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    expect(restoreCacheMock).toHaveBeenCalledTimes(1);
 | 
					    expect(restoreCacheMock).toHaveBeenCalledTimes(1);
 | 
				
			||||||
    expect(restoreCacheMock).toHaveBeenCalledWith([path], key, []);
 | 
					    expect(restoreCacheMock).toHaveBeenCalledWith([path], key, []);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -237,6 +241,7 @@ test("restore with restore keys and no cache found", async () => {
 | 
				
			|||||||
        restoreKeys: [restoreKey]
 | 
					        restoreKeys: [restoreKey]
 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    const setCacheHitOutputMock = jest.spyOn(actionUtils, "setCacheHitOutput");
 | 
				
			||||||
    const infoMock = jest.spyOn(core, "info");
 | 
					    const infoMock = jest.spyOn(core, "info");
 | 
				
			||||||
    const failedMock = jest.spyOn(core, "setFailed");
 | 
					    const failedMock = jest.spyOn(core, "setFailed");
 | 
				
			||||||
    const stateMock = jest.spyOn(core, "saveState");
 | 
					    const stateMock = jest.spyOn(core, "saveState");
 | 
				
			||||||
@ -248,6 +253,9 @@ test("restore with restore keys and no cache found", async () => {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    await run();
 | 
					    await run();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    expect(setCacheHitOutputMock).toHaveBeenCalledTimes(1);
 | 
				
			||||||
 | 
					    expect(setCacheHitOutputMock).toHaveBeenCalledWith(false);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    expect(restoreCacheMock).toHaveBeenCalledTimes(1);
 | 
					    expect(restoreCacheMock).toHaveBeenCalledTimes(1);
 | 
				
			||||||
    expect(restoreCacheMock).toHaveBeenCalledWith([path], key, [restoreKey]);
 | 
					    expect(restoreCacheMock).toHaveBeenCalledWith([path], key, [restoreKey]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										1
									
								
								dist/restore/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								dist/restore/index.js
									
									
									
									
										vendored
									
									
								
							@ -49012,6 +49012,7 @@ function run() {
 | 
				
			|||||||
                    primaryKey,
 | 
					                    primaryKey,
 | 
				
			||||||
                    ...restoreKeys
 | 
					                    ...restoreKeys
 | 
				
			||||||
                ].join(", ")}`);
 | 
					                ].join(", ")}`);
 | 
				
			||||||
 | 
					                utils.setCacheHitOutput(false);
 | 
				
			||||||
                return;
 | 
					                return;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            // Store the matched cache key
 | 
					            // Store the matched cache key
 | 
				
			||||||
 | 
				
			|||||||
@ -43,6 +43,7 @@ async function run(): Promise<void> {
 | 
				
			|||||||
                ].join(", ")}`
 | 
					                ].join(", ")}`
 | 
				
			||||||
            );
 | 
					            );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            utils.setCacheHitOutput(false);
 | 
				
			||||||
            return;
 | 
					            return;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user