From a512d3f67bfc0bd3229e814cf6e83a47ad590aaf Mon Sep 17 00:00:00 2001 From: Roy Crihfield Date: Thu, 10 Aug 2023 22:34:37 +0800 Subject: [PATCH] add full chain ref integ. test --- pkg/validator/ref_integrity_test.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkg/validator/ref_integrity_test.go b/pkg/validator/ref_integrity_test.go index 19f5cd8..a3775aa 100644 --- a/pkg/validator/ref_integrity_test.go +++ b/pkg/validator/ref_integrity_test.go @@ -240,6 +240,14 @@ var _ = Describe("referential integrity", func() { }) }) + Describe("ValidateReferentialIntegrity", func() { + It("Validates referential integrity of full chain", func() { + for i := uint64(startBlock); i <= chainLength; i++ { + err := validator.ValidateReferentialIntegrity(tx, i) + Expect(err).ToNot(HaveOccurred()) + } + }) + }) }) func deleteEntriesFrom(tx *sqlx.Tx, tableName string) error {