Update tests for error propagation

This commit is contained in:
Edvard
2019-02-14 16:04:12 +01:00
parent 6cd4e5ea95
commit 13eacf2081
15 changed files with 54 additions and 62 deletions
+2 -2
View File
@@ -48,7 +48,7 @@ var _ = Describe("Reading from the Geth blockchain", func() {
It("reads two blocks", func(done Done) {
blocks := fakes.NewMockBlockRepository()
lastBlock := blockChain.LastBlock()
lastBlock, _ := blockChain.LastBlock()
queriedBlocks := []int64{lastBlock.Int64() - 5, lastBlock.Int64() - 6}
history.RetrieveAndUpdateBlocks(blockChain, blocks, queriedBlocks)
blocks.AssertCreateOrUpdateBlocksCallCountAndBlockNumbersEquals(2, []int64{lastBlock.Int64() - 5, lastBlock.Int64() - 6})
@@ -60,7 +60,7 @@ var _ = Describe("Reading from the Geth blockchain", func() {
Expect(err).ToNot(HaveOccurred())
firstBlock, err := blockChain.GetBlockByNumber(int64(1))
Expect(err).ToNot(HaveOccurred())
lastBlockNumber := blockChain.LastBlock()
lastBlockNumber, _ := blockChain.LastBlock()
Expect(genesisBlock.Number).To(Equal(int64(0)))
Expect(firstBlock.Number).To(Equal(int64(1)))