Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
Siddharth More authored and Siddharth More committed May 5, 2024
1 parent 8e6c7d0 commit e655eb2
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 38 deletions.
35 changes: 0 additions & 35 deletions disperser/common/blobstore/blob_metadata_store_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -297,13 +297,6 @@ func TestBlobMetadataStoreWithAccountId(t *testing.T) {
err = blobMetadataStore.QueueNewBlobMetadata(ctx, metadata2)
assert.NoError(t, err)

fetchedMetadata, err := blobMetadataStore.GetBlobMetadata(ctx, blobKey1)
assert.NoError(t, err)
assert.Equal(t, metadata1, fetchedMetadata)
fetchedMetadata, err = blobMetadataStore.GetBlobMetadata(ctx, blobKey2)
assert.NoError(t, err)
assert.Equal(t, metadata2, fetchedMetadata)

processing, err := blobMetadataStore.GetBlobMetadataByStatus(ctx, disperser.Processing)
assert.NoError(t, err)
assert.Len(t, processing, 1)
Expand All @@ -317,34 +310,6 @@ func TestBlobMetadataStoreWithAccountId(t *testing.T) {
assert.NoError(t, err)
assert.Equal(t, int32(2), blobCountByAccountId)

err = blobMetadataStore.IncrementNumRetries(ctx, metadata1)
assert.NoError(t, err)
fetchedMetadata, err = blobMetadataStore.GetBlobMetadata(ctx, blobKey1)
assert.NoError(t, err)
metadata1.NumRetries = 1
assert.Equal(t, metadata1, fetchedMetadata)

finalized, err := blobMetadataStore.GetBlobMetadataByStatus(ctx, disperser.Finalized)
assert.NoError(t, err)
assert.Len(t, finalized, 1)
assert.Equal(t, metadata2, finalized[0])

finalizedCount, err := blobMetadataStore.GetBlobMetadataByStatusCount(ctx, disperser.Finalized)
assert.NoError(t, err)
assert.Equal(t, int32(1), finalizedCount)

confirmedMetadata := getConfirmedMetadata(t, blobKey1)
err = blobMetadataStore.UpdateBlobMetadata(ctx, blobKey1, confirmedMetadata)
assert.NoError(t, err)

metadata, err := blobMetadataStore.GetBlobMetadataInBatch(ctx, confirmedMetadata.ConfirmationInfo.BatchHeaderHash, confirmedMetadata.ConfirmationInfo.BlobIndex)
assert.NoError(t, err)
assert.Equal(t, metadata, confirmedMetadata)

confirmedCount, err := blobMetadataStore.GetBlobMetadataByStatusCount(ctx, disperser.Confirmed)
assert.NoError(t, err)
assert.Equal(t, int32(1), confirmedCount)

deleteItems(t, []commondynamodb.Key{
{
"MetadataHash": &types.AttributeValueMemberS{Value: blobKey1.MetadataHash},
Expand Down
3 changes: 0 additions & 3 deletions disperser/common/blobstore/blobstore_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ var (
blob = &core.Blob{
RequestHeader: core.BlobRequestHeader{
SecurityParams: securityParams,
BlobAuthHeader: core.BlobAuthHeader{
AccountID: "test",
},
},

Data: []byte("test"),
Expand Down

0 comments on commit e655eb2

Please sign in to comment.