desiredLRP, err := etcdDB.DesiredLRPByProcessGuid(logger, lrp.GetProcessGuid()) Expect(err).NotTo(HaveOccurred()) Eventually(creates).Should(Receive(Equal(desiredLRP))) }) It("sends an event down the pipe for updates", func() { etcdHelper.SetRawDesiredLRP(lrp) Eventually(creates).Should(Receive()) desiredBeforeUpdate, err := etcdDB.DesiredLRPByProcessGuid(logger, lrp.GetProcessGuid()) Expect(err).NotTo(HaveOccurred()) lrp.Instances = lrp.GetInstances() + 1 etcdHelper.SetRawDesiredLRP(lrp) Expect(err).NotTo(HaveOccurred()) desiredAfterUpdate, err := etcdDB.DesiredLRPByProcessGuid(logger, lrp.GetProcessGuid()) Expect(err).NotTo(HaveOccurred()) Eventually(changes).Should(Receive(Equal(&models.DesiredLRPChange{ Before: desiredBeforeUpdate, After: desiredAfterUpdate, }))) }) It("sends an event down the pipe for deletes", func() { etcdHelper.SetRawDesiredLRP(lrp)