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
1 changed files with 7 additions and 1 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue