From 795b8b5309ed94858f3bd56e42093d65dcdd0870 Mon Sep 17 00:00:00 2001 From: Mission Liao Date: Sun, 11 Nov 2018 13:13:40 +0800 Subject: test: add integration test (#315) * Rename NonByzantineTestSuite to WithSchedulerTestsuite * Add a method to query the latest position delivered * Add integration test for core.Consensus * Show detailed list for test cases in CI --- core/test/utils.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'core/test/utils.go') diff --git a/core/test/utils.go b/core/test/utils.go index f5f4c36..56c5eac 100644 --- a/core/test/utils.go +++ b/core/test/utils.go @@ -157,3 +157,16 @@ func cloneDKGFinalize(final *typesDKG.Finalize) ( } return } + +func cloneBlockRandomnessResult(rand *types.BlockRandomnessResult) ( + copied *types.BlockRandomnessResult) { + b, err := rlp.EncodeToBytes(rand) + if err != nil { + panic(err) + } + copied = &types.BlockRandomnessResult{} + if err = rlp.DecodeBytes(b, copied); err != nil { + panic(err) + } + return +} -- cgit v1.2.3