mirror of
				https://github.com/actions/cache.git
				synced 2025-10-31 20:08:36 +08:00 
			
		
		
		
	Fix test to use new size limit
This commit is contained in:
		
							parent
							
								
									c7ec74200c
								
							
						
					
					
						commit
						ddf4636b73
					
				|  | @ -194,7 +194,7 @@ test("save with large cache outputs warning", async () => { | ||||||
| 
 | 
 | ||||||
|     const createTarMock = jest.spyOn(tar, "createTar"); |     const createTarMock = jest.spyOn(tar, "createTar"); | ||||||
| 
 | 
 | ||||||
|     const cacheSize = 4 * 1024 * 1024 * 1024; //~4GB, over the 2GB limit
 |     const cacheSize = 6 * 1024 * 1024 * 1024; //~6GB, over the 5GB limit
 | ||||||
|     jest.spyOn(actionUtils, "getArchiveFileSize").mockImplementationOnce(() => { |     jest.spyOn(actionUtils, "getArchiveFileSize").mockImplementationOnce(() => { | ||||||
|         return cacheSize; |         return cacheSize; | ||||||
|     }); |     }); | ||||||
|  | @ -208,7 +208,7 @@ test("save with large cache outputs warning", async () => { | ||||||
| 
 | 
 | ||||||
|     expect(logWarningMock).toHaveBeenCalledTimes(1); |     expect(logWarningMock).toHaveBeenCalledTimes(1); | ||||||
|     expect(logWarningMock).toHaveBeenCalledWith( |     expect(logWarningMock).toHaveBeenCalledWith( | ||||||
|         "Cache size of ~4096 MB (4294967296 B) is over the 2GB limit, not saving cache." |         "Cache size of ~6144 MB (6442450944 B) is over the 5GB limit, not saving cache." | ||||||
|     ); |     ); | ||||||
| 
 | 
 | ||||||
|     expect(failedMock).toHaveBeenCalledTimes(0); |     expect(failedMock).toHaveBeenCalledTimes(0); | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 David Hadka
						David Hadka