Allow Proxy to be initialized with store

The proxy should be able to reuse a store on initialization.
Minor cleanup to make experimentation with the proxy easier.
This commit is contained in:
Clayton Coleman
2016-03-04 20:40:46 -05:00
parent fbe5f70267
commit a5152a4005
2 changed files with 32 additions and 19 deletions

View File

@@ -61,7 +61,7 @@ func TestNewServicesSourceApi_UpdatesAndMultipleServices(t *testing.T) {
ch := make(chan ServiceUpdate)
newServicesSourceApiFromLW(lw, 30*time.Second, ch)
cache.NewReflector(lw, &api.Service{}, NewServiceStore(nil, ch), 30*time.Second).Run()
got, ok := <-ch
if !ok {
@@ -172,7 +172,7 @@ func TestNewEndpointsSourceApi_UpdatesAndMultipleEndpoints(t *testing.T) {
ch := make(chan EndpointsUpdate)
newEndpointsSourceApiFromLW(lw, 30*time.Second, ch)
cache.NewReflector(lw, &api.Endpoints{}, NewEndpointsStore(nil, ch), 30*time.Second).Run()
got, ok := <-ch
if !ok {