func NewActualLRPRoutingInfo(actualLRPGroup *models.ActualLRPGroup) *ActualLRPRoutingInfo {
	lrp, evacuating := actualLRPGroup.Resolve()
	return &ActualLRPRoutingInfo{
		ActualLRP:  lrp,
		Evacuating: evacuating,
	}
}
Exemple #2
0
			)

			BeforeEach(func() {
				lrpKey := models.NewActualLRPKey("process-guid", 1, "domain")
				instanceLRP = &models.ActualLRP{
					ActualLRPKey: lrpKey,
					Since:        1138,
				}
				evacuatingLRP = &models.ActualLRP{
					ActualLRPKey: lrpKey,
					Since:        3417,
				}
			})

			JustBeforeEach(func() {
				resolvedLRP, evacuating = group.Resolve()
			})

			Context("When only the Instance LRP is set", func() {
				BeforeEach(func() {
					group = models.ActualLRPGroup{
						Instance: instanceLRP,
					}
				})

				It("returns the Instance LRP", func() {
					Expect(resolvedLRP).To(Equal(instanceLRP))
					Expect(evacuating).To(BeFalse())
				})
			})