Example #1
0
	. "github.com/onsi/ginkgo"
	. "github.com/onsi/gomega"

	"github.com/cloudfoundry-incubator/lattice/ltc/app_examiner"
	"github.com/cloudfoundry-incubator/lattice/ltc/app_examiner/fake_noaa_consumer"
	"github.com/cloudfoundry-incubator/lattice/ltc/route_helpers"
	"github.com/cloudfoundry-incubator/receptor"
	"github.com/cloudfoundry-incubator/receptor/fake_receptor"
	"github.com/cloudfoundry/sonde-go/events"
)

var _ = Describe("AppExaminer", func() {

	var (
		fakeReceptorClient *fake_receptor.FakeClient
		fakeNoaaConsumer   *fake_noaa_consumer.FakeNoaaConsumer
		appExaminer        app_examiner.AppExaminer
	)

	BeforeEach(func() {
		fakeReceptorClient = &fake_receptor.FakeClient{}
		fakeNoaaConsumer = &fake_noaa_consumer.FakeNoaaConsumer{}
		appExaminer = app_examiner.New(fakeReceptorClient, fakeNoaaConsumer)
	})

	Describe("ListApps", func() {
		Context("with the receptor returning both desiredlrps and actuallrps", func() {
			BeforeEach(func() {
				desiredLrps := []receptor.DesiredLRPResponse{
					{
						ProcessGuid: "process2-scalingDown",