Beispiel #1
0
	"time"

	"github.com/cloudfoundry-incubator/garden"
	. "github.com/cloudfoundry-incubator/garden-linux/container_daemon"
	"github.com/cloudfoundry-incubator/garden-linux/container_daemon/fake_connector"
	"github.com/cloudfoundry-incubator/garden-linux/container_daemon/fake_term"
	"github.com/cloudfoundry-incubator/garden-linux/container_daemon/unix_socket"
	"github.com/docker/docker/pkg/term"
	. "github.com/onsi/ginkgo"
	. "github.com/onsi/gomega"
	"github.com/onsi/gomega/gbytes"
)

var _ = Describe("Process", func() {
	var socketConnector *fake_connector.FakeConnector
	var fakeTerm *fake_term.FakeTerm
	var sigwinchCh chan os.Signal

	var process *Process
	var pidfile string

	BeforeEach(func() {
		fakeTerm = new(fake_term.FakeTerm)
		socketConnector = new(fake_connector.FakeConnector)
		socketConnector.ConnectReturns([]unix_socket.Fd{nil, nil, nil, FakeFd(0)}, 0, nil)

		sigwinchCh = make(chan os.Signal)

		tmp, err := ioutil.TempDir("", "pidfile")
		Expect(err).NotTo(HaveOccurred())
Beispiel #2
0
	"time"

	"github.com/cloudfoundry-incubator/garden"
	"github.com/cloudfoundry-incubator/garden-linux/container_daemon"
	"github.com/cloudfoundry-incubator/garden-linux/container_daemon/fake_connector"
	"github.com/cloudfoundry-incubator/garden-linux/container_daemon/fake_term"
	"github.com/cloudfoundry-incubator/garden-linux/iodaemon/link"
	"github.com/docker/docker/pkg/term"
	. "github.com/onsi/ginkgo"
	. "github.com/onsi/gomega"
	"github.com/onsi/gomega/gbytes"
)

var _ = Describe("Process", func() {
	var socketConnector *fake_connector.FakeConnector
	var fakeTerm *fake_term.FakeTerm
	var sigwinchCh chan os.Signal
	var signalReader io.Reader
	var signalWriter io.Writer
	var response *container_daemon.ResponseMessage
	var process *container_daemon.Process

	BeforeEach(func() {
		var err error

		fakeTerm = new(fake_term.FakeTerm)
		socketConnector = new(fake_connector.FakeConnector)
		response = &container_daemon.ResponseMessage{
			Type:  container_daemon.ProcessResponse,
			Files: []container_daemon.StreamingFile{nil, nil, nil, FakeFd(0)},
			Pid:   0,