Replace GinkgoRandomSeed with proper randomisation

This commit is contained in:
Edvard
2018-10-23 10:47:01 +02:00
parent 794a7e5f99
commit f55449d0e5
17 changed files with 43 additions and 26 deletions
+2 -1
View File
@@ -16,6 +16,7 @@ package vat_init_test
import (
"database/sql"
"math/rand"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
@@ -134,7 +135,7 @@ var _ = Describe("Vat init repository", func() {
)
BeforeEach(func() {
startingBlock = GinkgoRandomSeed()
startingBlock = rand.Int63()
vatInitBlock = startingBlock + 1
endingBlock = startingBlock + 2
@@ -20,6 +20,7 @@ import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"github.com/vulcanize/vulcanizedb/pkg/transformers/factories"
"math/rand"
"github.com/vulcanize/vulcanizedb/pkg/core"
"github.com/vulcanize/vulcanizedb/pkg/fakes"
@@ -45,8 +46,8 @@ var _ = Describe("Vat init transformer", func() {
converter = vat_init_mocks.MockVatInitConverter{}
repository = vat_init_mocks.MockVatInitRepository{}
fetcher = mocks.MockLogFetcher{}
headerOne = core.Header{Id: GinkgoRandomSeed(), BlockNumber: GinkgoRandomSeed()}
headerTwo = core.Header{Id: GinkgoRandomSeed(), BlockNumber: GinkgoRandomSeed()}
headerOne = core.Header{Id: rand.Int63(), BlockNumber: rand.Int63()}
headerTwo = core.Header{Id: rand.Int63(), BlockNumber: rand.Int63()}
transformer = factories.Transformer{
Config: config,
Fetcher: &fetcher,