forked from TrueCloudLab/frostfs-node
[#135] get-object: Add tracing spans
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
5af9f58469
commit
0920d848d0
80 changed files with 523 additions and 231 deletions
|
@ -1,6 +1,7 @@
|
|||
package blobstor
|
||||
|
||||
import (
|
||||
"context"
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
|
@ -43,13 +44,13 @@ func TestExists(t *testing.T) {
|
|||
for i := range objects {
|
||||
prm.Address = objectCore.AddressOf(objects[i])
|
||||
|
||||
res, err := b.Exists(prm)
|
||||
res, err := b.Exists(context.Background(), prm)
|
||||
require.NoError(t, err)
|
||||
require.True(t, res.Exists)
|
||||
}
|
||||
|
||||
prm.Address = oidtest.Address()
|
||||
res, err := b.Exists(prm)
|
||||
res, err := b.Exists(context.Background(), prm)
|
||||
require.NoError(t, err)
|
||||
require.False(t, res.Exists)
|
||||
|
||||
|
@ -60,13 +61,13 @@ func TestExists(t *testing.T) {
|
|||
|
||||
// Object exists, first error is logged.
|
||||
prm.Address = objectCore.AddressOf(objects[0])
|
||||
res, err := b.Exists(prm)
|
||||
res, err := b.Exists(context.Background(), prm)
|
||||
require.NoError(t, err)
|
||||
require.True(t, res.Exists)
|
||||
|
||||
// Object doesn't exist, first error is returned.
|
||||
prm.Address = objectCore.AddressOf(objects[1])
|
||||
_, err = b.Exists(prm)
|
||||
_, err = b.Exists(context.Background(), prm)
|
||||
require.Error(t, err)
|
||||
require.ErrorIs(t, err, teststore.ErrDiskExploded)
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue