platformtest: add QueueSubtest functionality
Use it from a top-level test case to queue the execution of sub-tests after this test case is complete. Note that the testing harness executes the subtest _after_ the current top-level test. Hence, the subtest cannot use any ZFS state of the top-level test.
This commit is contained in:
@@ -11,6 +11,13 @@ import (
|
||||
type Context struct {
|
||||
context.Context
|
||||
RootDataset string
|
||||
// Use this callback from a top-level test case to queue the
|
||||
// execution of sub-tests after this test case is complete.
|
||||
//
|
||||
// Note that the testing harness executes the subtest
|
||||
// _after_ the current top-level test. Hence, the subtest
|
||||
// cannot use any ZFS state of the top-level test.
|
||||
QueueSubtest func(id string, stf func(*Context))
|
||||
}
|
||||
|
||||
var FailNowSentinel = fmt.Errorf("platformtest: FailNow called on context")
|
||||
|
||||
Reference in New Issue
Block a user