store.Run(incomingChan) close(done) }) }) Context("when the store has data", func() { BeforeEach(func() { adapter.Create(buildNode(app1Service1)) adapter.Create(buildNode(app1Service2)) adapter.Create(buildNode(app2Service1)) go store.Run(incomingChan) }) It("does not modify the store, if the incoming data is already there", func(done Done) { events, stop, _ := adapter.Watch("/loggregator/services") incomingChan <- domain.AppServices{ AppId: app1Service1.AppId, Urls: []string{app1Service1.Url, app1Service2.Url}, } assertInStore(app1Service1, app1Service2, app2Service1) assertNoDataOnChannel(events) stop <- true close(done) })