Skip to content

Commit

Permalink
fix: make integration test use two quorums (#855)
Browse files Browse the repository at this point in the history
  • Loading branch information
ian-shim authored Oct 31, 2024
1 parent f4015d6 commit a44b1a6
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions inabox/tests/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,15 @@ var _ = Describe("Inabox Integration", func() {
[32]byte(reply1.GetInfo().GetBlobVerificationProof().GetBatchMetadata().GetBatchHeader().GetBatchRoot()),
1, // retrieve blob 1 from quorum 1
)
Expect(err).To(BeNil())

_, err = retrievalClient.RetrieveBlob(ctx,
[32]byte(reply1.GetInfo().GetBlobVerificationProof().GetBatchMetadata().GetBatchHeaderHash()),
reply1.GetInfo().GetBlobVerificationProof().GetBlobIndex(),
uint(reply1.GetInfo().GetBlobVerificationProof().GetBatchMetadata().GetBatchHeader().GetReferenceBlockNumber()),
[32]byte(reply1.GetInfo().GetBlobVerificationProof().GetBatchMetadata().GetBatchHeader().GetBatchRoot()),
2, // retrieve blob 1 from quorum 2
)
Expect(err).NotTo(BeNil())

retrieved, err = retrievalClient.RetrieveBlob(ctx,
Expand All @@ -160,6 +169,14 @@ var _ = Describe("Inabox Integration", func() {
[32]byte(reply2.GetInfo().GetBlobVerificationProof().GetBatchMetadata().GetBatchHeader().GetBatchRoot()),
1, // retrieve from quorum 1
)
Expect(err).To(BeNil())
_, err = retrievalClient.RetrieveBlob(ctx,
[32]byte(reply2.GetInfo().GetBlobVerificationProof().GetBatchMetadata().GetBatchHeaderHash()),
reply2.GetInfo().GetBlobVerificationProof().GetBlobIndex(),
uint(reply2.GetInfo().GetBlobVerificationProof().GetBatchMetadata().GetBatchHeader().GetReferenceBlockNumber()),
[32]byte(reply2.GetInfo().GetBlobVerificationProof().GetBatchMetadata().GetBatchHeader().GetBatchRoot()),
2, // retrieve from quorum 2
)
Expect(err).NotTo(BeNil())
})
})
Expand Down

0 comments on commit a44b1a6

Please sign in to comment.