diff --git a/internal/shutdown/shutdown.go b/internal/shutdown/shutdown.go index 299a027..ca296b0 100644 --- a/internal/shutdown/shutdown.go +++ b/internal/shutdown/shutdown.go @@ -26,7 +26,7 @@ func ShutdownServices(ctx context.Context, notifierCh chan os.Signal, waitTime t }) select { - case _ = <-successCh: + case <-successCh: return nil case err := <-errCh: return err diff --git a/pkg/beaconclient/beaconclient.test b/pkg/beaconclient/beaconclient.test new file mode 100755 index 0000000..6ba7bcc Binary files /dev/null and b/pkg/beaconclient/beaconclient.test differ diff --git a/pkg/beaconclient/processslot.go b/pkg/beaconclient/processslot.go index 92b43d5..61dfd85 100644 --- a/pkg/beaconclient/processslot.go +++ b/pkg/beaconclient/processslot.go @@ -236,6 +236,7 @@ func (ps *ProcessSlot) createWriteObjects() *DatabaseWriter { if ps.BlockRoot != "" { blockRoot = ps.BlockRoot } else { + log.Info("We need to add logic") // We need to get the state of Slot + 1, then we can run the below. // WE can query it for each run, or we can leave it blank, and update it. // I just want to avoid getting the same state twice, especially since the state can get heavy. diff --git a/pkg/database/sql/postgres/pgx_test.go b/pkg/database/sql/postgres/pgx_test.go index c5c5422..d2181d9 100644 --- a/pkg/database/sql/postgres/pgx_test.go +++ b/pkg/database/sql/postgres/pgx_test.go @@ -29,17 +29,18 @@ var _ = Describe("Pgx", func() { _, err := postgres.NewPostgresDB(postgres.Config{ Driver: "PGX", }) - Expect(err).NotTo(BeNil()) + Expect(err).NotTo(HaveOccurred()) present, err := doesContainsSubstring(err.Error(), sql.DbConnectionFailedMsg) Expect(present).To(BeTrue()) + Expect(err).NotTo(HaveOccurred()) }) }) Context("The connection is successful", func() { It("Should create a DB object", func() { db, err := postgres.NewPostgresDB(postgres.DefaultConfig) - defer db.Close() Expect(err).To(BeNil()) + defer db.Close() }) }) }) diff --git a/pkg/gracefulshutdown/gracefulshutdown.go b/pkg/gracefulshutdown/gracefulshutdown.go index a8ba972..8230a38 100644 --- a/pkg/gracefulshutdown/gracefulshutdown.go +++ b/pkg/gracefulshutdown/gracefulshutdown.go @@ -38,7 +38,6 @@ func Shutdown(ctx context.Context, notifierCh chan os.Signal, timeout time.Durat timeoutFunc := time.AfterFunc(timeout, func() { log.Warnf(TimeoutErr(timeout.String()).Error()) errCh <- TimeoutErr(timeout.String()) - return }) defer timeoutFunc.Stop()