From 69ad3a76d4e5d17f8c41fa1fef4027fca048bb7b Mon Sep 17 00:00:00 2001 From: carlos-romano Date: Tue, 31 Dec 2024 09:56:07 +0100 Subject: [PATCH] Fix other tests --- internal/statetransition/errors.go | 12 ++++++------ tests/integration/assurances_test.go | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/internal/statetransition/errors.go b/internal/statetransition/errors.go index 1c8d4f92..aba949f5 100644 --- a/internal/statetransition/errors.go +++ b/internal/statetransition/errors.go @@ -5,10 +5,10 @@ import "github.com/pkg/errors" var ( ErrTimeslotOutOfRange = errors.New("timeslot out of range") ErrWrongAssignment = errors.New("wrong assignment") - ErrBadSignature = errors.New("bad_signature") - ErrReportTimeout = errors.New("report_timeout") - ErrBadAttestationParent = errors.New("bad_attestation_parent") - ErrBadOrder = errors.New("bad_order") - ErrCoreNotEngaged = errors.New("core_not_engaged") - ErrBadValidatorIndex = errors.New("bad_validator_index") + ErrBadSignature = errors.New("bad signature") + ErrReportTimeout = errors.New("report timeout") + ErrBadAttestationParent = errors.New("bad attestation parent") + ErrBadOrder = errors.New("bad order") + ErrCoreNotEngaged = errors.New("core not engaged") + ErrBadValidatorIndex = errors.New("bad validator index") ) diff --git a/tests/integration/assurances_test.go b/tests/integration/assurances_test.go index ead3408e..787e5a1a 100644 --- a/tests/integration/assurances_test.go +++ b/tests/integration/assurances_test.go @@ -192,7 +192,7 @@ func TestAssurancesTiny(t *testing.T) { newBlock := mapBlock(tc.Input) theState := mapAssurancesState(tc.PreState) if theState.CoreAssignments, err = statetransition.CalculateIntermediateCoreFromAssurances(theState.ValidatorState.CurrentValidators, theState.CoreAssignments, newBlock.Header, newBlock.Extrinsic.EA); tc.Output.Err != "" { - assert.EqualError(t, err, tc.Output.Err) + require.EqualError(t, err, strings.ReplaceAll(tc.Output.Err, "_", " ")) } else { require.NoError(t, err) }