diff --git a/itests/kit/ensemble_presets.go b/itests/kit/ensemble_presets.go index 5e9e37da5..111509305 100644 --- a/itests/kit/ensemble_presets.go +++ b/itests/kit/ensemble_presets.go @@ -31,14 +31,14 @@ func EnsembleWithMinerAndMarketNodes(t *testing.T, opts ...interface{}) (*TestFu main, market TestMiner ) - mainNodeOpts := []NodeOpt{WithSubsystem(SSealing), WithSubsystem(SSectorStorage), WithSubsystem(SMining), DisableLibp2p()} + mainNodeOpts := []NodeOpt{WithSubsystems(SSealing, SSectorStorage, SMining), DisableLibp2p()} mainNodeOpts = append(mainNodeOpts, nopts...) blockTime := 100 * time.Millisecond ens := NewEnsemble(t, eopts...).FullNode(&fullnode, nopts...).Miner(&main, &fullnode, mainNodeOpts...).Start() ens.BeginMining(blockTime) - marketNodeOpts := []NodeOpt{OwnerAddr(fullnode.DefaultKey), MainMiner(&main), WithSubsystem(SStorageMarket)} + marketNodeOpts := []NodeOpt{OwnerAddr(fullnode.DefaultKey), MainMiner(&main), WithSubsystems(SStorageMarket)} marketNodeOpts = append(marketNodeOpts, nopts...) ens.Miner(&market, &fullnode, marketNodeOpts...).Start().Connect(market, fullnode) diff --git a/itests/kit/node_opts.go b/itests/kit/node_opts.go index 5246f4b24..20723dc1e 100644 --- a/itests/kit/node_opts.go +++ b/itests/kit/node_opts.go @@ -58,9 +58,11 @@ func WithAllSubsystems() NodeOpt { } } -func WithSubsystem(single MinerSubsystem) NodeOpt { +func WithSubsystems(systems ...MinerSubsystem) NodeOpt { return func(opts *nodeOpts) error { - opts.subsystems = opts.subsystems.Add(single) + for _, s := range systems { + opts.subsystems = opts.subsystems.Add(s) + } return nil } }