mirror of
https://github.com/actions/cache.git
synced 2025-05-25 19:42:29 +00:00
Add unit tests for restore (#62)
* Move archive file size to utils * Disable net connect with nock * Add unit tests for restore * Fix test names and test URL
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
import * as core from "@actions/core";
|
||||
import * as io from "@actions/io";
|
||||
import * as fs from "fs";
|
||||
import * as os from "os";
|
||||
import * as path from "path";
|
||||
import * as uuidV4 from "uuid/v4";
|
||||
@ -32,6 +33,10 @@ export async function createTempDirectory(): Promise<string> {
|
||||
return dest;
|
||||
}
|
||||
|
||||
export function getArchiveFileSize(path: string): number {
|
||||
return fs.statSync(path).size;
|
||||
}
|
||||
|
||||
export function isExactKeyMatch(
|
||||
key: string,
|
||||
cacheResult?: ArtifactCacheEntry
|
||||
|
Reference in New Issue
Block a user