Merge pull request #43039 from caesarxuchao/fix-fake-event-search
Automatic merge from submit-queue (batch tested with PRs 41297, 42638, 42666, 43039, 42567) use metav1.ListOptions in fake_event_expansion.go Fix https://github.com/kubernetes/client-go/issues/145.
This commit is contained in:
commit
ce55522e41
@ -36,7 +36,6 @@ go_library(
|
||||
],
|
||||
tags = ["automanaged"],
|
||||
deps = [
|
||||
"//pkg/api:go_default_library",
|
||||
"//pkg/api/v1:go_default_library",
|
||||
"//pkg/apis/policy/v1beta1:go_default_library",
|
||||
"//pkg/client/clientset_generated/clientset/typed/core/v1:go_default_library",
|
||||
|
@ -17,10 +17,10 @@ limitations under the License.
|
||||
package fake
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/fields"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
core "k8s.io/client-go/testing"
|
||||
"k8s.io/kubernetes/pkg/api"
|
||||
"k8s.io/kubernetes/pkg/api/v1"
|
||||
)
|
||||
|
||||
@ -67,9 +67,9 @@ func (c *FakeEvents) PatchWithEventNamespace(event *v1.Event, data []byte) (*v1.
|
||||
|
||||
// Search returns a list of events matching the specified object.
|
||||
func (c *FakeEvents) Search(scheme *runtime.Scheme, objOrRef runtime.Object) (*v1.EventList, error) {
|
||||
action := core.NewRootListAction(eventsResource, api.ListOptions{})
|
||||
action := core.NewRootListAction(eventsResource, metav1.ListOptions{})
|
||||
if c.ns != "" {
|
||||
action = core.NewListAction(eventsResource, c.ns, api.ListOptions{})
|
||||
action = core.NewListAction(eventsResource, c.ns, metav1.ListOptions{})
|
||||
}
|
||||
obj, err := c.Fake.Invokes(action, &v1.EventList{})
|
||||
if obj == nil {
|
||||
|
@ -17,9 +17,9 @@ limitations under the License.
|
||||
package fake
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/fields"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/client-go/pkg/api"
|
||||
"k8s.io/client-go/pkg/api/v1"
|
||||
core "k8s.io/client-go/testing"
|
||||
)
|
||||
@ -67,9 +67,9 @@ func (c *FakeEvents) PatchWithEventNamespace(event *v1.Event, data []byte) (*v1.
|
||||
|
||||
// Search returns a list of events matching the specified object.
|
||||
func (c *FakeEvents) Search(scheme *runtime.Scheme, objOrRef runtime.Object) (*v1.EventList, error) {
|
||||
action := core.NewRootListAction(eventsResource, api.ListOptions{})
|
||||
action := core.NewRootListAction(eventsResource, metav1.ListOptions{})
|
||||
if c.ns != "" {
|
||||
action = core.NewListAction(eventsResource, c.ns, api.ListOptions{})
|
||||
action = core.NewListAction(eventsResource, c.ns, metav1.ListOptions{})
|
||||
}
|
||||
obj, err := c.Fake.Invokes(action, &v1.EventList{})
|
||||
if obj == nil {
|
||||
|
1
vendor/BUILD
vendored
1
vendor/BUILD
vendored
@ -12890,7 +12890,6 @@ go_library(
|
||||
"//vendor:k8s.io/apimachinery/pkg/types",
|
||||
"//vendor:k8s.io/apimachinery/pkg/watch",
|
||||
"//vendor:k8s.io/client-go/kubernetes/typed/core/v1",
|
||||
"//vendor:k8s.io/client-go/pkg/api",
|
||||
"//vendor:k8s.io/client-go/pkg/api/v1",
|
||||
"//vendor:k8s.io/client-go/pkg/apis/policy/v1beta1",
|
||||
"//vendor:k8s.io/client-go/rest",
|
||||
|
Loading…
Reference in New Issue
Block a user