Refactor cache upload functionality and improve test cases

This commit is contained in:
Bassem Dghaidi authored and GitHub committed 2024-11-28 03:52:09 -08:00
1 parent ecf992d567
commit af0425c904
3 files changed
+44 -43

No files matched your search

@@ -5,12 +5,13 @@ import {
BlockBlobClient,
BlockBlobParallelUploadOptions
} from '@azure/storage-blob'
import {InvalidResponseError} from '../shared/errors'
import { InvalidResponseError } from './shared/errors'
export async function uploadCacheFile(
signedUploadURL: string,
archivePath: string
): Promise<BlobUploadCommonResponse> {
export async function uploadCacheArchiveSDK
(
signedUploadURL: string,
archivePath: string
): Promise<BlobUploadCommonResponse> {
// Specify data transfer options
const uploadOptions: BlockBlobParallelUploadOptions = {
blockSize: 4 * 1024 * 1024, // 4 MiB max block size