"github.com/vito/gordon" "github.com/vito/gordon/warden" ) var _ = Describe("The Warden server", func() { var wardenClient gordon.Client runtime.GOMAXPROCS(runtime.NumCPU()) BeforeEach(func() { socketPath := os.Getenv("WARDEN_TEST_SOCKET") Eventually(ErrorDialingUnix(socketPath)).ShouldNot(HaveOccurred()) wardenClient = gordon.NewClient(&gordon.ConnectionInfo{ Network: "unix", Addr: socketPath, }) err := wardenClient.Connect() Expect(err).ToNot(HaveOccurred()) }) Describe("streaming output from a chatty job", func() { var handle string BeforeEach(func() { res, err := wardenClient.Create() Expect(err).ToNot(HaveOccurred()) handle = res.GetHandle() })
func (r *GardenRunner) NewClient() gordon.Client { return gordon.NewClient(&gordon.ConnectionInfo{ Network: "tcp", Addr: r.addr(), }) }