}) }) Context("when the config changes", func() { var newConfig atc.Config BeforeEach(func() { configs := make(chan atc.Config, 1) configs <- atc.Config{ Resources: atc.ResourceConfigs{resourceConfig}, } fakeRadarDB.GetConfigStub = func() (atc.Config, db.ConfigVersion, error) { select { case c := <-configs: return c, 1, nil default: return newConfig, 2, nil } } }) Context("with new configuration for the resource", func() { var newResource atc.ResourceConfig BeforeEach(func() { newResource = atc.ResourceConfig{ Name: "some-resource", Type: "git", Source: atc.Source{"uri": "http://example.com/updated-uri"}, }