Skip to content

Commit

Permalink
Minor fix in networkpolicy_controller_test.go
Browse files Browse the repository at this point in the history
The same runtime.Object list cannot be used with both the standard K8s
client and the Antrea CRD client.
  • Loading branch information
antoninbas committed Jul 6, 2020
1 parent 664bc0c commit 412587d
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,10 @@ type networkPolicyController struct {
crdInformerFactory crdinformers.SharedInformerFactory
}

// objects is an initial set of K8s objects that is exposed through the client.
func newController(objects ...runtime.Object) (*fake.Clientset, *networkPolicyController) {
client := newClientset(objects...)
crdClient := fakeversioned.NewSimpleClientset(objects...)
crdClient := fakeversioned.NewSimpleClientset()
informerFactory := informers.NewSharedInformerFactory(client, informerDefaultResync)
crdInformerFactory := crdinformers.NewSharedInformerFactory(crdClient, informerDefaultResync)
appliedToGroupStore := store.NewAppliedToGroupStore()
Expand Down

0 comments on commit 412587d

Please sign in to comment.