[#276] Merge repo with frostfs-api-go
Signed-off-by: Pavel Pogodaev <p.pogodaev@yadro.com>
This commit is contained in:
parent
5361f0eceb
commit
6ce73790ea
337 changed files with 66666 additions and 283 deletions
26
api/object/lock_test.go
Normal file
26
api/object/lock_test.go
Normal file
|
@ -0,0 +1,26 @@
|
|||
package object_test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-sdk-go/api/object"
|
||||
objecttest "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/api/object/test"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func TestLockRW(t *testing.T) {
|
||||
var l object.Lock
|
||||
var obj object.Object
|
||||
|
||||
require.Error(t, object.ReadLock(&l, obj))
|
||||
|
||||
l = *objecttest.GenerateLock(false)
|
||||
|
||||
object.WriteLock(&obj, l)
|
||||
|
||||
var l2 object.Lock
|
||||
|
||||
require.NoError(t, object.ReadLock(&l2, obj))
|
||||
|
||||
require.Equal(t, l, l2)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue