Fix layerizer tests by providing a default maxRetries value

This commit is contained in:
Nikolay Edigaryev 2025-03-11 00:02:51 +01:00
parent 36bf7116c7
commit 5d8b9b1f01
2 changed files with 2 additions and 2 deletions

View File

@ -45,7 +45,7 @@ class DiskV1: Disk {
return pushedLayers return pushedLayers
} }
static func pull(registry: Registry, diskLayers: [OCIManifestLayer], diskURL: URL, concurrency: UInt, progress: Progress, localLayerCache: LocalLayerCache? = nil, deduplicate: Bool = false, maxRetries: UInt) async throws { static func pull(registry: Registry, diskLayers: [OCIManifestLayer], diskURL: URL, concurrency: UInt, progress: Progress, localLayerCache: LocalLayerCache? = nil, deduplicate: Bool = false, maxRetries: UInt = 5) async throws {
if !FileManager.default.createFile(atPath: diskURL.path, contents: nil) { if !FileManager.default.createFile(atPath: diskURL.path, contents: nil) {
throw OCIError.FailedToCreateVmFile throw OCIError.FailedToCreateVmFile
} }

View File

@ -84,7 +84,7 @@ class DiskV2: Disk {
} }
} }
static func pull(registry: Registry, diskLayers: [OCIManifestLayer], diskURL: URL, concurrency: UInt, progress: Progress, localLayerCache: LocalLayerCache? = nil, deduplicate: Bool = false, maxRetries: UInt) async throws { static func pull(registry: Registry, diskLayers: [OCIManifestLayer], diskURL: URL, concurrency: UInt, progress: Progress, localLayerCache: LocalLayerCache? = nil, deduplicate: Bool = false, maxRetries: UInt = 5) async throws {
// Support resumable pulls // Support resumable pulls
let pullResumed = FileManager.default.fileExists(atPath: diskURL.path) let pullResumed = FileManager.default.fileExists(atPath: diskURL.path)