mirror of
https://github.com/distribution/distribution
synced 2024-11-06 19:35:52 +01: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:
parent
d2e16fc74a
commit
0c33bb1092
@ -432,7 +432,13 @@ func (d *driver) blobName(path string) string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func is404(err error) bool {
|
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 {
|
type writer struct {
|
||||||
|
Loading…
Reference in New Issue
Block a user