convert TPR controller to posthook instead of disable flag

This commit is contained in:
deads2k
2016-10-17 16:24:02 -04:00
parent 19e9f7e400
commit 1423654295
4 changed files with 32 additions and 35 deletions

View File

@@ -98,14 +98,6 @@ func setUp(t *testing.T) (*Master, *etcdtesting.EtcdTestServer, Config, *assert.
config.GenericConfig.LoopbackClientConfig = &restclient.Config{APIPath: "/api", ContentConfig: restclient.ContentConfig{NegotiatedSerializer: api.Codecs}}
config.EnableCoreControllers = false
// TODO: this is kind of hacky. The trouble is that the sync loop
// runs in a go-routine and there is no way to validate in the test
// that the sync routine has actually run. The right answer here
// is probably to add some sort of callback that we can register
// to validate that it's actually been run, but for now we don't
// run the sync routine and register types manually.
config.disableThirdPartyControllerForTesting = true
master, err := config.Complete().New()
if err != nil {
t.Fatal(err)