Skip to content

Commit

Permalink
Added panics and a TODO for unexpected errors in key_assignment.go.
Browse files Browse the repository at this point in the history
  • Loading branch information
kirdatatjana committed Oct 3, 2024
1 parent 5f1b1fe commit 0e70d6e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/integration/key_assignment.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 0e70d6e

Please sign in to comment.