mirror of
https://git.vectorsigma.ru/public/k3s.git
synced 2026-07-31 23:19:54 +00:00
* Commit of new etcd snapshot integration tests. * Updated integration github action to not run on doc changes. * Update Drone runner to only run unit tests Signed-off-by: dereknola <derek.nola@suse.com>
49 lines
1.6 KiB
Go
49 lines
1.6 KiB
Go
package leafnodes
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/onsi/ginkgo/internal/failer"
|
|
"github.com/onsi/ginkgo/types"
|
|
)
|
|
|
|
type SetupNode struct {
|
|
runner *runner
|
|
}
|
|
|
|
func (node *SetupNode) Run() (outcome types.SpecState, failure types.SpecFailure) {
|
|
return node.runner.run()
|
|
}
|
|
|
|
func (node *SetupNode) Type() types.SpecComponentType {
|
|
return node.runner.nodeType
|
|
}
|
|
|
|
func (node *SetupNode) CodeLocation() types.CodeLocation {
|
|
return node.runner.codeLocation
|
|
}
|
|
|
|
func NewBeforeEachNode(body interface{}, codeLocation types.CodeLocation, timeout time.Duration, failer *failer.Failer, componentIndex int) *SetupNode {
|
|
return &SetupNode{
|
|
runner: newRunner(body, codeLocation, timeout, failer, types.SpecComponentTypeBeforeEach, componentIndex),
|
|
}
|
|
}
|
|
|
|
func NewAfterEachNode(body interface{}, codeLocation types.CodeLocation, timeout time.Duration, failer *failer.Failer, componentIndex int) *SetupNode {
|
|
return &SetupNode{
|
|
runner: newRunner(body, codeLocation, timeout, failer, types.SpecComponentTypeAfterEach, componentIndex),
|
|
}
|
|
}
|
|
|
|
func NewJustBeforeEachNode(body interface{}, codeLocation types.CodeLocation, timeout time.Duration, failer *failer.Failer, componentIndex int) *SetupNode {
|
|
return &SetupNode{
|
|
runner: newRunner(body, codeLocation, timeout, failer, types.SpecComponentTypeJustBeforeEach, componentIndex),
|
|
}
|
|
}
|
|
|
|
func NewJustAfterEachNode(body interface{}, codeLocation types.CodeLocation, timeout time.Duration, failer *failer.Failer, componentIndex int) *SetupNode {
|
|
return &SetupNode{
|
|
runner: newRunner(body, codeLocation, timeout, failer, types.SpecComponentTypeJustAfterEach, componentIndex),
|
|
}
|
|
}
|