Update repository tests for absence of MissingHeaders

This commit is contained in:
Edvard 2018-12-04 17:53:46 +01:00
parent 9789648cc2
commit 47c75d055b
29 changed files with 3 additions and 256 deletions

View File

@ -86,14 +86,4 @@ var _ = Describe("Bite repository", func() {
shared_behaviors.SharedRepositoryMarkHeaderCheckedBehaviors(&inputs)
})
Describe("MissingHeaders", func() {
inputs := shared_behaviors.MissingHeadersBehaviorInputs{
Repository: &biteRepository,
RepositoryTwo: &bite.BiteRepository{},
}
shared_behaviors.SharedRepositoryMissingHeadersBehaviors(&inputs)
})
})

View File

@ -98,13 +98,4 @@ var _ = Describe("Cat file chop lump repository", func() {
shared_behaviors.SharedRepositoryMarkHeaderCheckedBehaviors(&inputs)
})
Describe("MissingHeaders", func() {
inputs := shared_behaviors.MissingHeadersBehaviorInputs{
Repository: &catFileRepository,
RepositoryTwo: &chop_lump.CatFileChopLumpRepository{},
}
shared_behaviors.SharedRepositoryMissingHeadersBehaviors(&inputs)
})
})

View File

@ -83,12 +83,4 @@ var _ = Describe("Cat file flip repository", func() {
shared_behaviors.SharedRepositoryMarkHeaderCheckedBehaviors(&inputs)
})
Describe("MissingHeaders", func() {
inputs := shared_behaviors.MissingHeadersBehaviorInputs{
Repository: &catFileFlipRepository,
RepositoryTwo: &flip.CatFileFlipRepository{},
}
shared_behaviors.SharedRepositoryMissingHeadersBehaviors(&inputs)
})
})

View File

@ -81,13 +81,4 @@ var _ = Describe("Cat file pit vow repository", func() {
}
shared_behaviors.SharedRepositoryMarkHeaderCheckedBehaviors(&inputs)
})
Describe("MissingHeaders", func() {
inputs := shared_behaviors.MissingHeadersBehaviorInputs{
Repository: &catFilePitVowRepository,
RepositoryTwo: &pit_vow.CatFilePitVowRepository{},
}
shared_behaviors.SharedRepositoryMissingHeadersBehaviors(&inputs)
})
})

View File

@ -84,13 +84,4 @@ var _ = Describe("Deal Repository", func() {
shared_behaviors.SharedRepositoryMarkHeaderCheckedBehaviors(&inputs)
})
Describe("MissingHeaders", func() {
inputs := shared_behaviors.MissingHeadersBehaviorInputs{
Repository: &dealRepository,
RepositoryTwo: &deal.DealRepository{},
}
shared_behaviors.SharedRepositoryMissingHeadersBehaviors(&inputs)
})
})

View File

@ -92,13 +92,4 @@ var _ = Describe("Dent Repository", func() {
shared_behaviors.SharedRepositoryMarkHeaderCheckedBehaviors(&inputs)
})
Describe("MissingHeaders", func() {
inputs := shared_behaviors.MissingHeadersBehaviorInputs{
Repository: &dentRepository,
RepositoryTwo: &dent.DentRepository{},
}
shared_behaviors.SharedRepositoryMissingHeadersBehaviors(&inputs)
})
})

View File

@ -80,13 +80,4 @@ var _ = Describe("Drip drip repository", func() {
shared_behaviors.SharedRepositoryMarkHeaderCheckedBehaviors(&inputs)
})
Describe("MissingHeaders", func() {
inputs := shared_behaviors.MissingHeadersBehaviorInputs{
Repository: &dripDripRepository,
RepositoryTwo: &drip_drip.DripDripRepository{},
}
shared_behaviors.SharedRepositoryMissingHeadersBehaviors(&inputs)
})
})

View File

@ -82,13 +82,4 @@ var _ = Describe("Drip file ilk repository", func() {
shared_behaviors.SharedRepositoryMarkHeaderCheckedBehaviors(&inputs)
})
Describe("MissingHeaders", func() {
inputs := shared_behaviors.MissingHeadersBehaviorInputs{
Repository: &dripFileIlkRepository,
RepositoryTwo: &ilk.DripFileIlkRepository{},
}
shared_behaviors.SharedRepositoryMissingHeadersBehaviors(&inputs)
})
})

View File

@ -82,13 +82,4 @@ var _ = Describe("Drip file repo repository", func() {
shared_behaviors.SharedRepositoryMarkHeaderCheckedBehaviors(&inputs)
})
Describe("MissingHeaders", func() {
inputs := shared_behaviors.MissingHeadersBehaviorInputs{
Repository: &dripFileRepoRepository,
RepositoryTwo: &repo.DripFileRepoRepository{},
}
shared_behaviors.SharedRepositoryMissingHeadersBehaviors(&inputs)
})
})

View File

@ -74,15 +74,6 @@ var _ = Describe("Drip file vow repository", func() {
})
Describe("MarkHeaderChecked", func() {
inputs := shared_behaviors.MissingHeadersBehaviorInputs{
Repository: &dripFileVowRepository,
RepositoryTwo: &vow.DripFileVowRepository{},
}
shared_behaviors.SharedRepositoryMissingHeadersBehaviors(&inputs)
})
Describe("MissingHeaders", func() {
inputs := shared_behaviors.MarkedHeaderCheckedBehaviorInputs{
CheckedHeaderColumnName: constants.DripFileVowChecked,
Repository: &dripFileVowRepository,

View File

@ -87,13 +87,4 @@ var _ = Describe("Flap Kick Repository", func() {
shared_behaviors.SharedRepositoryMarkHeaderCheckedBehaviors(&inputs)
})
Describe("MissingHeaders", func() {
inputs := shared_behaviors.MissingHeadersBehaviorInputs{
Repository: &flapKickRepository,
RepositoryTwo: &flap_kick.FlapKickRepository{},
}
shared_behaviors.SharedRepositoryMissingHeadersBehaviors(&inputs)
})
})

View File

@ -87,15 +87,6 @@ var _ = Describe("FlipKick Repository", func() {
shared_behaviors.SharedRepositoryMarkHeaderCheckedBehaviors(&inputs)
})
Describe("missing headers", func() {
inputs := shared_behaviors.MissingHeadersBehaviorInputs{
Repository: &flipKickRepository,
RepositoryTwo: &flip_kick.FlipKickRepository{},
}
shared_behaviors.SharedRepositoryMissingHeadersBehaviors(&inputs)
})
})
func assertDBRecordCount(db *postgres.DB, dbTable string, expectedCount int) {

View File

@ -85,13 +85,4 @@ var _ = Describe("FlopRepository", func() {
shared_behaviors.SharedRepositoryMarkHeaderCheckedBehaviors(&inputs)
})
Describe("MissingHeaders", func() {
inputs := shared_behaviors.MissingHeadersBehaviorInputs{
Repository: &repository,
RepositoryTwo: &flop_kick.FlopKickRepository{},
}
shared_behaviors.SharedRepositoryMissingHeadersBehaviors(&inputs)
})
})

View File

@ -86,13 +86,4 @@ var _ = Describe("Frob repository", func() {
shared_behaviors.SharedRepositoryMarkHeaderCheckedBehaviors(&inputs)
})
Describe("MissingHeaders", func() {
inputs := shared_behaviors.MissingHeadersBehaviorInputs{
Repository: &frobRepository,
RepositoryTwo: &frob.FrobRepository{},
}
shared_behaviors.SharedRepositoryMissingHeadersBehaviors(&inputs)
})
})

View File

@ -81,13 +81,4 @@ var _ = Describe("Pit file debt ceiling repository", func() {
shared_behaviors.SharedRepositoryMarkHeaderCheckedBehaviors(&inputs)
})
Describe("MissingHeaders", func() {
inputs := shared_behaviors.MissingHeadersBehaviorInputs{
Repository: &pitFileDebtCeilingRepository,
RepositoryTwo: &debt_ceiling.PitFileDebtCeilingRepository{},
}
shared_behaviors.SharedRepositoryMissingHeadersBehaviors(&inputs)
})
})

View File

@ -82,13 +82,4 @@ var _ = Describe("Pit file ilk repository", func() {
shared_behaviors.SharedRepositoryMarkHeaderCheckedBehaviors(&inputs)
})
Describe("MissingHeaders", func() {
inputs := shared_behaviors.MissingHeadersBehaviorInputs{
Repository: &pitFileIlkRepository,
RepositoryTwo: &ilk.PitFileIlkRepository{},
}
shared_behaviors.SharedRepositoryMissingHeadersBehaviors(&inputs)
})
})

View File

@ -82,13 +82,4 @@ var _ = Describe("Price feeds repository", func() {
shared_behaviors.SharedRepositoryMarkHeaderCheckedBehaviors(&inputs)
})
Describe("MissingHeaders", func() {
inputs := shared_behaviors.MissingHeadersBehaviorInputs{
Repository: &priceFeedRepository,
RepositoryTwo: &price_feeds.PriceFeedRepository{},
}
shared_behaviors.SharedRepositoryMissingHeadersBehaviors(&inputs)
})
})

View File

@ -94,13 +94,4 @@ var _ = Describe("TendRepository", func() {
shared_behaviors.SharedRepositoryMarkHeaderCheckedBehaviors(&inputs)
})
Describe("MissingHeaders", func() {
inputs := shared_behaviors.MissingHeadersBehaviorInputs{
Repository: &tendRepository,
RepositoryTwo: &tend.TendRepository{},
}
shared_behaviors.SharedRepositoryMissingHeadersBehaviors(&inputs)
})
})

View File

@ -17,7 +17,6 @@ package shared_behaviors
import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"github.com/vulcanize/vulcanizedb/pkg/core"
"github.com/vulcanize/vulcanizedb/pkg/datastore"
"github.com/vulcanize/vulcanizedb/pkg/datastore/postgres"
"github.com/vulcanize/vulcanizedb/pkg/datastore/postgres/repositories"
@ -25,7 +24,6 @@ import (
"github.com/vulcanize/vulcanizedb/pkg/transformers/factories"
"github.com/vulcanize/vulcanizedb/pkg/transformers/test_data"
"github.com/vulcanize/vulcanizedb/test_config"
"math/rand"
)
var (
@ -132,7 +130,8 @@ func SharedRepositoryCreateBehaviors(inputs *CreateBehaviorInputs) {
})
}
func SharedRepositoryMissingHeadersBehaviors(inputs *MissingHeadersBehaviorInputs) {
// Saved, will base tests of aggregate fetching on this
/*func SharedRepositoryMissingHeadersBehaviors(inputs *MissingHeadersBehaviorInputs) {
Describe("MissingHeaders", func() {
var (
repository = inputs.Repository
@ -211,7 +210,7 @@ func SharedRepositoryMissingHeadersBehaviors(inputs *MissingHeadersBehaviorInput
Expect(nodeTwoMissingHeaders[2].BlockNumber).To(Or(Equal(startingBlockNumber), Equal(eventSpecificBlockNumber), Equal(endingBlockNumber)))
})
})
}
}*/
func SharedRepositoryMarkHeaderCheckedBehaviors(inputs *MarkedHeaderCheckedBehaviorInputs) {
var repository = inputs.Repository

View File

@ -86,15 +86,6 @@ var _ = Describe("VatFlux Repository", func() {
})
})
Describe("MissingHeaders", func() {
inputs := shared_behaviors.MissingHeadersBehaviorInputs{
Repository: &repository,
RepositoryTwo: &vat_flux.VatFluxRepository{},
}
shared_behaviors.SharedRepositoryMissingHeadersBehaviors(&inputs)
})
Describe("MarkHeaderChecked", func() {
inputs := shared_behaviors.MarkedHeaderCheckedBehaviorInputs{
CheckedHeaderColumnName: constants.VatFluxChecked,

View File

@ -84,13 +84,4 @@ var _ = Describe("Vat.fold repository", func() {
shared_behaviors.SharedRepositoryMarkHeaderCheckedBehaviors(&inputs)
})
Describe("MissingHeaders", func() {
inputs := shared_behaviors.MissingHeadersBehaviorInputs{
Repository: &repository,
RepositoryTwo: &vat_fold.VatFoldRepository{},
}
shared_behaviors.SharedRepositoryMissingHeadersBehaviors(&inputs)
})
})

View File

@ -73,13 +73,4 @@ var _ = Describe("Vat grab repository", func() {
shared_behaviors.SharedRepositoryMarkHeaderCheckedBehaviors(&inputs)
})
Describe("MissingHeaders", func() {
inputs := shared_behaviors.MissingHeadersBehaviorInputs{
Repository: &vatGrabRepository,
RepositoryTwo: &vat_grab.VatGrabRepository{},
}
shared_behaviors.SharedRepositoryMissingHeadersBehaviors(&inputs)
})
})

View File

@ -83,15 +83,6 @@ var _ = Describe("VatHeal Repository", func() {
})
})
Describe("MissingHeaders", func() {
inputs := shared_behaviors.MissingHeadersBehaviorInputs{
Repository: &repository,
RepositoryTwo: &vat_heal.VatHealRepository{},
}
shared_behaviors.SharedRepositoryMissingHeadersBehaviors(&inputs)
})
Describe("MarkCheckedHeader", func() {
inputs := shared_behaviors.MarkedHeaderCheckedBehaviorInputs{
CheckedHeaderColumnName: constants.VatHealChecked,

View File

@ -72,15 +72,6 @@ var _ = Describe("Vat init repository", func() {
})
})
Describe("MissingHeaders", func() {
inputs := shared_behaviors.MissingHeadersBehaviorInputs{
Repository: &repository,
RepositoryTwo: &vat_init.VatInitRepository{},
}
shared_behaviors.SharedRepositoryMissingHeadersBehaviors(&inputs)
})
Describe("MarkHeaderChecked", func() {
inputs := shared_behaviors.MarkedHeaderCheckedBehaviorInputs{
CheckedHeaderColumnName: constants.VatInitChecked,

View File

@ -71,15 +71,6 @@ var _ = Describe("Vat Move", func() {
})
})
Describe("MissingHeaders", func() {
inputs := shared_behaviors.MissingHeadersBehaviorInputs{
Repository: &repository,
RepositoryTwo: &vat_move.VatMoveRepository{},
}
shared_behaviors.SharedRepositoryMissingHeadersBehaviors(&inputs)
})
Describe("MarkHeaderChecked", func() {
inputs := shared_behaviors.MarkedHeaderCheckedBehaviorInputs{
CheckedHeaderColumnName: constants.VatMoveChecked,

View File

@ -68,13 +68,4 @@ var _ = Describe("Vat slip repository", func() {
shared_behaviors.SharedRepositoryMarkHeaderCheckedBehaviors(&inputs)
})
Describe("MissingHeaders", func() {
inputs := shared_behaviors.MissingHeadersBehaviorInputs{
Repository: &repository,
RepositoryTwo: &vat_slip.VatSlipRepository{},
}
shared_behaviors.SharedRepositoryMissingHeadersBehaviors(&inputs)
})
})

View File

@ -68,13 +68,4 @@ var _ = Describe("Vat toll repository", func() {
shared_behaviors.SharedRepositoryMarkHeaderCheckedBehaviors(&inputs)
})
Describe("MissingHeaders", func() {
inputs := shared_behaviors.MissingHeadersBehaviorInputs{
Repository: &repository,
RepositoryTwo: &vat_toll.VatTollRepository{},
}
shared_behaviors.SharedRepositoryMissingHeadersBehaviors(&inputs)
})
})

View File

@ -71,13 +71,4 @@ var _ = Describe("Vat tune repository", func() {
shared_behaviors.SharedRepositoryMarkHeaderCheckedBehaviors(&inputs)
})
Describe("MissingHeaders", func() {
inputs := shared_behaviors.MissingHeadersBehaviorInputs{
Repository: &repository,
RepositoryTwo: &vat_tune.VatTuneRepository{},
}
shared_behaviors.SharedRepositoryMissingHeadersBehaviors(&inputs)
})
})

View File

@ -80,13 +80,4 @@ var _ = Describe("Vow flog repository", func() {
shared_behaviors.SharedRepositoryMarkHeaderCheckedBehaviors(&inputs)
})
Describe("MissingHeaders", func() {
inputs := shared_behaviors.MissingHeadersBehaviorInputs{
Repository: &repository,
RepositoryTwo: &vow_flog.VowFlogRepository{},
}
shared_behaviors.SharedRepositoryMissingHeadersBehaviors(&inputs)
})
})