From 0e70d6e02bd005603381c298851ea17dba39b576 Mon Sep 17 00:00:00 2001 From: kirdatatjana Date: Thu, 3 Oct 2024 15:56:10 +0200 Subject: [PATCH] Added panics and a TODO for unexpected errors in key_assignment.go. --- tests/integration/key_assignment.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/integration/key_assignment.go b/tests/integration/key_assignment.go index 1b39a3bef7..a7614a7063 100644 --- a/tests/integration/key_assignment.go +++ b/tests/integration/key_assignment.go @@ -31,6 +31,7 @@ import ( // For each scenario where the key assignment does not produce an error, // the test also checks that VSCPackets are relayed to the consumer chain and that the clients on // the provider and consumer chain can be updated. +// TODO: Remove panics when unexpected error occurs. func (s *CCVTestSuite) TestKeyAssignment() { testCases := []struct { name string @@ -106,7 +107,7 @@ func (s *CCVTestSuite) TestKeyAssignment() { validator, consumerKey := generateNewConsumerKey(s, 0) err := pk.AssignConsumerKey(s.providerCtx(), s.getFirstBundle().ConsumerId, validator, consumerKey) if err != nil { - return err + panic(err) } // same key assignment, but different validator @@ -129,7 +130,7 @@ func (s *CCVTestSuite) TestKeyAssignment() { validator, consumerKey := generateNewConsumerKey(s, 0) err := pk.AssignConsumerKey(s.providerCtx(), s.getFirstBundle().ConsumerId, validator, consumerKey) if err != nil { - return err + panic(err) } // same key assignment, but different validator @@ -175,7 +176,7 @@ func (s *CCVTestSuite) TestKeyAssignment() { validator, consumerKey := generateNewConsumerKey(s, 0) err := pk.AssignConsumerKey(s.providerCtx(), s.getFirstBundle().ConsumerId, validator, consumerKey) if err != nil { - return err + panic(err) } s.nextEpoch()