Skip to content

Commit

Permalink
kola/cluster: wrap H.Run to construct a TestCluster for the subtest.
Browse files Browse the repository at this point in the history
  • Loading branch information
marineam committed Apr 10, 2017
1 parent 288c55b commit b631aae
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions kola/cluster/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@ type TestCluster struct {
NativeFuncs []string
}

// Run runs f as a subtest and reports whether f succeeded.
func (t *TestCluster) Run(name string, f func(c TestCluster)) bool {
return t.H.Run(name, func(h *harness.H) {
f(TestCluster{H: h, Cluster: t.Cluster})
})
}

// RunNative runs a registered NativeFunc on a remote machine
func (t *TestCluster) RunNative(funcName string, m platform.Machine) error {
// scp and execute kolet on remote machine
Expand Down

0 comments on commit b631aae

Please sign in to comment.