Skip to content

Commit

Permalink
TEST
Browse files Browse the repository at this point in the history
Signed-off-by: Leonard Lyubich <[email protected]>
  • Loading branch information
cthulhu-rider committed Dec 4, 2024
1 parent ec6a6e2 commit 52ff237
Showing 1 changed file with 12 additions and 19 deletions.
31 changes: 12 additions & 19 deletions pool/pool_aio_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,6 @@ func testPoolInterfaceWithAIO(t *testing.T, nodeAddr string) {
ctx := context.Background()

account, signer, cont := testData(t)
var eaclTable eacl.Table

poolStat := stat.NewPoolStatistic()
opts := DefaultOptions()
Expand All @@ -258,8 +257,6 @@ func testPoolInterfaceWithAIO(t *testing.T, nodeAddr string) {
require.NoError(t, err)
require.NoError(t, pool.Dial(ctx))

var containerID cid.ID
var objectID oid.ID
var objectList []oid.ID

payload := make([]byte, 8)
Expand Down Expand Up @@ -303,36 +300,32 @@ func testPoolInterfaceWithAIO(t *testing.T, nodeAddr string) {
require.Greater(t, snap.AllTime(), uint64(0))
})

t.Run("create container", func(t *testing.T) {
ctxTimeout, cancel := context.WithTimeout(context.Background(), defaultTimeOut)
defer cancel()

containerID = testCreateContainer(ctxTimeout, t, signer, cont, pool)
cl, err := pool.sdkClient()
// create container
ctxTimeout, cancel := context.WithTimeout(context.Background(), defaultTimeOut)
defer cancel()

require.NoError(t, err)
require.NoError(t, isBucketCreated(ctxTimeout, cl, containerID))
containerID := testCreateContainer(ctxTimeout, t, signer, cont, pool)
cl, err := pool.sdkClient()

eaclTable = testEaclTable(containerID)
})
require.NoError(t, err)
require.NoError(t, isBucketCreated(ctxTimeout, cl, containerID))

t.Run("set eacl", func(t *testing.T) {
ctxTimeout, cancel := context.WithTimeout(ctx, defaultTimeOut)
defer cancel()

table := testSetEacl(ctxTimeout, t, signer, eaclTable, pool)
table := testSetEacl(ctxTimeout, t, signer, testEaclTable(containerID), pool)
cl, err := pool.sdkClient()

require.NoError(t, err)
require.NoError(t, isEACLCreated(ctxTimeout, cl, containerID, table))
})

t.Run("upload object", func(t *testing.T) {
ctxTimeout, cancel := context.WithTimeout(ctx, defaultTimeOut)
defer cancel()
// upload object
ctxTimeout, cancel = context.WithTimeout(ctx, defaultTimeOut)
defer cancel()

objectID = testObjectPutInit(ctxTimeout, t, account, containerID, signer, payload, pool)
})
objectID := testObjectPutInit(ctxTimeout, t, account, containerID, signer, payload, pool)

t.Run("download object", func(t *testing.T) {
ctxTimeout, cancel := context.WithTimeout(ctx, defaultTimeOut)
Expand Down

0 comments on commit 52ff237

Please sign in to comment.