Extract interface for master endpoints reconciler.

Make the master endpoints reconciler an interface so its implementation can be overridden, if
desired.
This commit is contained in:
Andy Goldstein
2016-06-06 17:48:22 -04:00
parent b6b079b1e9
commit 04ce042ff9
4 changed files with 53 additions and 27 deletions

View File

@@ -257,10 +257,9 @@ func TestNewBootstrapController(t *testing.T) {
controller := master.NewBootstrapController()
assert.Equal(controller.NamespaceRegistry, master.namespaceRegistry)
assert.Equal(controller.EndpointRegistry, master.endpointRegistry)
assert.Equal(controller.EndpointReconciler, NewMasterCountEndpointReconciler(master.MasterCount, master.endpointRegistry))
assert.Equal(controller.ServiceRegistry, master.serviceRegistry)
assert.Equal(controller.ServiceNodePortRange, portRange)
assert.Equal(controller.MasterCount, master.MasterCount)
assert.Equal(controller.ServicePort, master.ServiceReadWritePort)
assert.Equal(controller.PublicServicePort, master.PublicReadWritePort)
}