From e9d663c9979c6efdff08460cfa438a0056d8386b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Magiera?= Date: Thu, 23 Nov 2023 21:51:34 +0100 Subject: [PATCH] itests: Enable harmonydb in harmonydb tests --- itests/harmonydb_test.go | 1 + itests/harmonytask_test.go | 1 + itests/kit/ensemble.go | 1 + itests/kit/node_miner.go | 2 ++ itests/kit/node_opts.go | 7 +++++++ 5 files changed, 12 insertions(+) diff --git a/itests/harmonydb_test.go b/itests/harmonydb_test.go index 7c0c22d88..8b1b61234 100644 --- a/itests/harmonydb_test.go +++ b/itests/harmonydb_test.go @@ -16,6 +16,7 @@ func withSetup(t *testing.T, f func(*kit.TestMiner)) { _, miner, _ := kit.EnsembleMinimal(t, kit.LatestActorsAt(-1), kit.MockProofs(), + kit.WithSectorIndexDB(), ) f(miner) diff --git a/itests/harmonytask_test.go b/itests/harmonytask_test.go index d588a2490..ab54cbef4 100644 --- a/itests/harmonytask_test.go +++ b/itests/harmonytask_test.go @@ -30,6 +30,7 @@ func withDbSetup(t *testing.T, f func(*kit.TestMiner)) { _, miner, _ := kit.EnsembleMinimal(t, kit.LatestActorsAt(-1), kit.MockProofs(), + kit.WithSectorIndexDB(), ) logging.SetLogLevel("harmonytask", "debug") diff --git a/itests/kit/ensemble.go b/itests/kit/ensemble.go index 2a4bc6706..3c83ba896 100644 --- a/itests/kit/ensemble.go +++ b/itests/kit/ensemble.go @@ -607,6 +607,7 @@ func (n *Ensemble) Start() *Ensemble { cfg.Subsystems.EnableMining = m.options.subsystems.Has(SMining) cfg.Subsystems.EnableSealing = m.options.subsystems.Has(SSealing) cfg.Subsystems.EnableSectorStorage = m.options.subsystems.Has(SSectorStorage) + cfg.Subsystems.EnableSectorIndexDB = m.options.subsystems.Has(SHarmony) cfg.Dealmaking.MaxStagingDealsBytes = m.options.maxStagingDealsBytes if m.options.mainMiner != nil { diff --git a/itests/kit/node_miner.go b/itests/kit/node_miner.go index 4b81c9df0..ee2ee3eaa 100644 --- a/itests/kit/node_miner.go +++ b/itests/kit/node_miner.go @@ -37,6 +37,8 @@ const ( SSealing SSectorStorage + SHarmony + MinerSubsystems = iota ) diff --git a/itests/kit/node_opts.go b/itests/kit/node_opts.go index 6469c0a30..9af284148 100644 --- a/itests/kit/node_opts.go +++ b/itests/kit/node_opts.go @@ -89,6 +89,13 @@ func WithAllSubsystems() NodeOpt { } } +func WithSectorIndexDB() NodeOpt { + return func(opts *nodeOpts) error { + opts.subsystems = opts.subsystems.Add(SHarmony) + return nil + } +} + func WithSubsystems(systems ...MinerSubsystem) NodeOpt { return func(opts *nodeOpts) error { for _, s := range systems {