forked from TrueCloudLab/frostfs-node
[#668] shard/test: Move tests to the main package
Semantic patch (also, duplicate definitions are removed): ``` @@ var e identifier @@ -import "git.frostfs.info/TrueCloudLab/frostfs-node/pkg/local_object_storage/shard" -shard.e +e ``` Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
parent
aa23c6a83a
commit
bdecfbc1be
12 changed files with 79 additions and 99 deletions
|
@ -1,4 +1,4 @@
|
|||
package shard_test
|
||||
package shard
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
@ -8,7 +8,6 @@ import (
|
|||
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/core/object"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/local_object_storage/internal/testutil"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/local_object_storage/shard"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-sdk-go/client"
|
||||
cidtest "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/container/id/test"
|
||||
objectSDK "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/object"
|
||||
|
@ -33,8 +32,8 @@ func testShardHead(t *testing.T, hasWriteCache bool) {
|
|||
sh := newShard(t, hasWriteCache)
|
||||
defer releaseShard(sh, t)
|
||||
|
||||
var putPrm shard.PutPrm
|
||||
var headPrm shard.HeadPrm
|
||||
var putPrm PutPrm
|
||||
var headPrm HeadPrm
|
||||
|
||||
t.Run("regular object", func(t *testing.T) {
|
||||
obj := testutil.GenerateObject()
|
||||
|
@ -87,7 +86,7 @@ func testShardHead(t *testing.T, hasWriteCache bool) {
|
|||
})
|
||||
}
|
||||
|
||||
func testHead(t *testing.T, sh *shard.Shard, headPrm shard.HeadPrm, hasWriteCache bool) (shard.HeadRes, error) {
|
||||
func testHead(t *testing.T, sh *Shard, headPrm HeadPrm, hasWriteCache bool) (HeadRes, error) {
|
||||
res, err := sh.Head(context.Background(), headPrm)
|
||||
if hasWriteCache {
|
||||
require.Eventually(t, func() bool {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue