mirror of
https://github.com/distribution/distribution.git
synced 2025-09-14 06:09:00 +00:00
registry/storage/driver/azure: consider CannotVerifyCopySource as 404
Azure will return CannotVerifyCopySource with a 404 status code from a call to Move when the source blob does not exist. Details: https://learn.microsoft.com/en-us/rest/api/storageservices/blob-service-error-codes. This fixes the TestMoveNonexistent test case for the Azure driver. Signed-off-by: Flavian Missi <fmissi@redhat.com>
This commit is contained in:
@@ -432,7 +432,13 @@ func (d *driver) blobName(path string) string {
|
||||
}
|
||||
|
||||
func is404(err error) bool {
|
||||
return bloberror.HasCode(err, bloberror.BlobNotFound, bloberror.ContainerNotFound, bloberror.ResourceNotFound)
|
||||
return bloberror.HasCode(
|
||||
err,
|
||||
bloberror.BlobNotFound,
|
||||
bloberror.ContainerNotFound,
|
||||
bloberror.ResourceNotFound,
|
||||
bloberror.CannotVerifyCopySource,
|
||||
)
|
||||
}
|
||||
|
||||
type writer struct {
|
||||
|
Reference in New Issue
Block a user