add a client to use cubby in go projects
This commit is contained in:
parent
5f9c7813df
commit
699aa30b07
4 changed files with 524 additions and 0 deletions
20
testhelpers_test.go
Normal file
20
testhelpers_test.go
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
package cubby
|
||||
|
||||
import (
|
||||
"os/exec"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func runCmd(t *testing.T, name string, args ...string) ([]byte, error) {
|
||||
t.Helper()
|
||||
return exec.Command(name, args...).CombinedOutput()
|
||||
}
|
||||
|
||||
func startCmd(t *testing.T, name string, args ...string) *exec.Cmd {
|
||||
t.Helper()
|
||||
cmd := exec.Command(name, args...)
|
||||
if err := cmd.Start(); err != nil {
|
||||
t.Fatalf("start %s: %v", name, err)
|
||||
}
|
||||
return cmd
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue