mirror of
https://github.com/actions/cache.git
synced 2025-07-23 23:49:02 +07:00
Add unit tests for save (#98)
* Clean up args and arrange imports * Arrange args in restore tests * Add unit tests for save * Use const instead of let (linting)
This commit is contained in:
@ -93,9 +93,11 @@ export async function downloadCache(
|
||||
}
|
||||
|
||||
export async function saveCache(
|
||||
stream: NodeJS.ReadableStream,
|
||||
key: string
|
||||
key: string,
|
||||
archivePath: string
|
||||
): Promise<void> {
|
||||
const stream = fs.createReadStream(archivePath);
|
||||
|
||||
const cacheUrl = getCacheUrl();
|
||||
const token = process.env["ACTIONS_RUNTIME_TOKEN"] || "";
|
||||
const bearerCredentialHandler = new BearerCredentialHandler(token);
|
||||
|
Reference in New Issue
Block a user