Merge pull request #34979 from deads2k/tpr-04-storage-post-hook
Automatic merge from submit-queue convert TPR controller to posthook instead of disable flag Converts the third party resource controller into a posthook using a loopback client instead going direct to etcd. This let's us eliminate more flags and special-casing during initialization. Also, using a client brings us closer to building this without side-effects for downstream composers.
This commit is contained in:
@@ -99,14 +99,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)
|
||||
|
Reference in New Issue
Block a user