Describe("Saving actual state ", func() { BeforeEach(func() { err := store.SaveActualState([]models.InstanceHeartbeat{ heartbeat1, heartbeat2, }) Ω(err).ShouldNot(HaveOccured()) }) It("can stores the passed in actual state", func() { nodes, err := etcdAdapter.List("/actual") Ω(err).ShouldNot(HaveOccured()) Ω(nodes).Should(HaveLen(2)) Ω(nodes).Should(ContainElement(storeadapter.StoreNode{ Key: "/actual/" + heartbeat1.InstanceGuid, Value: heartbeat1.ToJson(), TTL: conf.HeartbeatTTL - 1, })) Ω(nodes).Should(ContainElement(storeadapter.StoreNode{ Key: "/actual/" + heartbeat2.InstanceGuid, Value: heartbeat2.ToJson(), TTL: conf.HeartbeatTTL - 1, })) }) }) Describe("Fetching actual state", func() { Context("When the actual state is present", func() { BeforeEach(func() { err := store.SaveActualState([]models.InstanceHeartbeat{ heartbeat1,