diff --git a/lotus-soup/main.go b/lotus-soup/main.go index b7a513bce..042310eb7 100644 --- a/lotus-soup/main.go +++ b/lotus-soup/main.go @@ -41,9 +41,9 @@ func main() { // Then we create a genesis block that allocates some funds to each node and collects // the presealed sectors. func dealsE2E(t *testkit.TestEnvironment) error { - // Dispatch non-client roles to defaults. + // Dispatch/forward non-client roles to defaults. if t.Role != "client" { - return testkit.RunDefaultRole(t) + return testkit.HandleDefaultRole(t) } cl, err := testkit.PrepareClient(t) diff --git a/lotus-soup/testkit/defaults.go b/lotus-soup/testkit/defaults.go index f9276e57f..a0681f37c 100644 --- a/lotus-soup/testkit/defaults.go +++ b/lotus-soup/testkit/defaults.go @@ -42,9 +42,11 @@ var DefaultRoles = map[RoleName]func(*TestEnvironment) error{ }, } -// RunDefaultRole runs a default role, extracted from the `role` RunEnv -// parameter. -func RunDefaultRole(t *TestEnvironment) error { +// HandleDefaultRole handles a role by running its default behaviour. +// +// This function is suitable to forward to when a test case doesn't need to +// explicitly handle/alter a role. +func HandleDefaultRole(t *TestEnvironment) error { f, ok := DefaultRoles[t.Role] if !ok { panic(fmt.Sprintf("unrecognized role: %s", t.Role))