コード例 #1
0
	"code.cloudfoundry.org/bbs/models"
	"code.cloudfoundry.org/bbs/models/test/model_helpers"
	"code.cloudfoundry.org/lager/lagertest"
	. "github.com/onsi/ginkgo"
	. "github.com/onsi/gomega"
	"github.com/onsi/gomega/gbytes"
)

var _ = Describe("Task Handlers", func() {
	var (
		logger     *lagertest.TestLogger
		controller *fake_controllers.FakeTaskController

		responseRecorder *httptest.ResponseRecorder

		handler *handlers.TaskHandler
		exitCh  chan struct{}

		requestBody interface{}

		request *http.Request
	)

	BeforeEach(func() {
		logger = lagertest.NewTestLogger("test")
		responseRecorder = httptest.NewRecorder()
		exitCh = make(chan struct{}, 1)
		controller = &fake_controllers.FakeTaskController{}
		handler = handlers.NewTaskHandler(controller, exitCh)
	})
コード例 #2
0
	"code.cloudfoundry.org/bbs/handlers/fake_controllers"
	"code.cloudfoundry.org/bbs/models"
	"code.cloudfoundry.org/bbs/models/test/model_helpers"
	"code.cloudfoundry.org/lager/lagertest"

	. "github.com/onsi/ginkgo"
	. "github.com/onsi/gomega"
)

var _ = Describe("Task Handlers", func() {
	var (
		logger     *lagertest.TestLogger
		controller *fake_controllers.FakeTaskController

		responseRecorder *httptest.ResponseRecorder

		handler *handlers.TaskHandler
		exitCh  chan struct{}

		requestBody interface{}
	)

	BeforeEach(func() {
		logger = lagertest.NewTestLogger("test")
		responseRecorder = httptest.NewRecorder()
		exitCh = make(chan struct{}, 1)
		controller = &fake_controllers.FakeTaskController{}
		handler = handlers.NewTaskHandler(controller, exitCh)
	})

	Describe("DesireTask", func() {
コード例 #3
0
	"code.cloudfoundry.org/bbs/models/test/model_helpers"
	"code.cloudfoundry.org/lager/lagertest"

	. "github.com/onsi/ginkgo"
	. "github.com/onsi/gomega"
	"github.com/onsi/gomega/gbytes"
)

var _ = Describe("Task Handlers", func() {
	var (
		logger     *lagertest.TestLogger
		controller *fake_controllers.FakeTaskController

		responseRecorder *httptest.ResponseRecorder

		handler *handlers.TaskHandler
		exitCh  chan struct{}

		task1 models.Task
		task2 models.Task

		requestBody interface{}
	)

	BeforeEach(func() {
		logger = lagertest.NewTestLogger("test")
		responseRecorder = httptest.NewRecorder()
		exitCh = make(chan struct{}, 1)
		controller = &fake_controllers.FakeTaskController{}
		handler = handlers.NewTaskHandler(controller, exitCh)
	})