From f0be9ef75986d57af39ec119b44f09b856b00819 Mon Sep 17 00:00:00 2001 From: Thomas E Lackey Date: Tue, 27 Sep 2022 21:05:26 -0500 Subject: [PATCH] Update system tests. --- pkg/beaconclient/healthcheck_test.go | 2 +- pkg/beaconclient/systemvalidation_test.go | 36 +++++++++++++++-------- 2 files changed, 24 insertions(+), 14 deletions(-) diff --git a/pkg/beaconclient/healthcheck_test.go b/pkg/beaconclient/healthcheck_test.go index 2afd28b..7bbea8b 100644 --- a/pkg/beaconclient/healthcheck_test.go +++ b/pkg/beaconclient/healthcheck_test.go @@ -31,7 +31,7 @@ var _ = Describe("Healthcheck", func() { BeforeEach(func() { var err error - Bc, err = beaconclient.CreateBeaconClient(context.Background(), "http", "localhost", 8005, 10, bcUniqueIdentifier, false, true, true) + Bc, err = beaconclient.CreateBeaconClient(context.Background(), "http", "localhost", 5052, 10, bcUniqueIdentifier, false, true, true) Expect(err).ToNot(HaveOccurred()) errBc, err = beaconclient.CreateBeaconClient(context.Background(), "http", "blah-blah", 1010, 10, bcUniqueIdentifier, false, true, true) Expect(err).ToNot(HaveOccurred()) diff --git a/pkg/beaconclient/systemvalidation_test.go b/pkg/beaconclient/systemvalidation_test.go index 7aabd41..26aa417 100644 --- a/pkg/beaconclient/systemvalidation_test.go +++ b/pkg/beaconclient/systemvalidation_test.go @@ -1,32 +1,42 @@ package beaconclient_test import ( + log "github.com/sirupsen/logrus" "os" "strconv" "time" . "github.com/onsi/ginkgo/v2" - //. "github.com/onsi/gomega" + "github.com/vulcanize/ipld-eth-beacon-indexer/pkg/beaconclient" ) var ( prodConfig = Config{ - protocol: os.Getenv("bc_protocol"), - address: os.Getenv("bc_address"), - port: getEnvInt(os.Getenv("bc_port")), - dbHost: os.Getenv("db_host"), - dbPort: getEnvInt(os.Getenv("db_port")), - dbName: os.Getenv("db_name"), - dbUser: os.Getenv("db_user"), - dbPassword: os.Getenv("db_password"), - dbDriver: os.Getenv("db_driver"), - knownGapsTableIncrement: 100000000, - bcUniqueIdentifier: 100, - checkDb: false, + protocol: os.Getenv("bc_protocol"), + address: os.Getenv("bc_address"), + port: getEnvInt(os.Getenv("bc_port")), + dbHost: os.Getenv("db_host"), + dbPort: getEnvInt(os.Getenv("db_port")), + dbName: os.Getenv("db_name"), + dbUser: os.Getenv("db_user"), + dbPassword: os.Getenv("db_password"), + dbDriver: os.Getenv("db_driver"), + knownGapsTableIncrement: 100000000, + bcUniqueIdentifier: 100, + checkDb: false, + performBeaconBlockProcessing: true, + // As of 2022-09, generating and downloading the full BeaconState is so slow it will cause the tests to fail. + performBeaconStateProcessing: false, } ) + +// Note: These tests expect to communicate with a fully-synced Beacon node. + var _ = Describe("Systemvalidation", Label("system"), func() { + level, _ := log.ParseLevel("debug") + log.SetLevel(level) + Describe("Run the application against a running lighthouse node", func() { Context("When we receive head messages", func() { It("We should process the messages successfully", func() {