forked from TrueCloudLab/frostfs-node
[#481] Update frostfs-sdk-go and error pointer receivers
Signed-off-by: Alejandro Lopez <a.lopez@yadro.com>
This commit is contained in:
parent
de3d1eb99c
commit
5b7e4a51b7
77 changed files with 265 additions and 313 deletions
|
@ -20,6 +20,7 @@ import (
|
|||
writecacheconfig "git.frostfs.info/TrueCloudLab/frostfs-node/pkg/local_object_storage/writecache/config"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/local_object_storage/writecache/writecachebbolt"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/util/logger"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-sdk-go/client"
|
||||
apistatus "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/client/status"
|
||||
cid "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/container/id"
|
||||
cidtest "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/container/id/test"
|
||||
|
@ -170,7 +171,7 @@ func TestRefillMetabaseCorrupted(t *testing.T) {
|
|||
var getPrm GetPrm
|
||||
getPrm.SetAddress(addr)
|
||||
_, err = sh.Get(context.Background(), getPrm)
|
||||
require.ErrorAs(t, err, new(apistatus.ObjectNotFound))
|
||||
require.True(t, client.IsErrObjectNotFound(err))
|
||||
require.NoError(t, sh.Close())
|
||||
}
|
||||
|
||||
|
@ -297,7 +298,7 @@ func TestRefillMetabase(t *testing.T) {
|
|||
res, err := sh.Head(context.Background(), headPrm)
|
||||
|
||||
if expObj == nil {
|
||||
require.ErrorAs(t, err, new(apistatus.ObjectNotFound))
|
||||
require.True(t, client.IsErrObjectNotFound(err))
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -322,9 +323,9 @@ func TestRefillMetabase(t *testing.T) {
|
|||
_, err := sh.Head(context.Background(), headPrm)
|
||||
|
||||
if exists {
|
||||
require.ErrorAs(t, err, new(apistatus.ObjectAlreadyRemoved))
|
||||
require.True(t, client.IsErrObjectAlreadyRemoved(err))
|
||||
} else {
|
||||
require.ErrorAs(t, err, new(apistatus.ObjectNotFound))
|
||||
require.True(t, client.IsErrObjectNotFound(err))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -339,9 +340,9 @@ func TestRefillMetabase(t *testing.T) {
|
|||
var prm InhumePrm
|
||||
prm.MarkAsGarbage(addr)
|
||||
|
||||
var target *apistatus.ObjectLocked
|
||||
_, err := sh.Inhume(context.Background(), prm)
|
||||
require.ErrorAs(t, err, new(apistatus.ObjectLocked),
|
||||
"object %s should be locked", locked[i])
|
||||
require.ErrorAs(t, err, &target, "object %s should be locked", locked[i])
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue