diff --git a/continuousscanning/watchbuilder.go b/continuousscanning/watchbuilder.go index c966346..e1f0377 100644 --- a/continuousscanning/watchbuilder.go +++ b/continuousscanning/watchbuilder.go @@ -25,11 +25,11 @@ func NewDynamicWatch(ctx context.Context, client dynamic.Interface, gvr schema.G } type SelfHealingWatch struct { - client dynamic.Interface - gvr schema.GroupVersionResource opts metav1.ListOptions - makeWatchFunc func(ctx context.Context, client dynamic.Interface, gvr schema.GroupVersionResource, opts metav1.ListOptions) (watch.Interface, error) + client dynamic.Interface currWatch watch.Interface + makeWatchFunc func(ctx context.Context, client dynamic.Interface, gvr schema.GroupVersionResource, opts metav1.ListOptions) (watch.Interface, error) + gvr schema.GroupVersionResource } func NewSelfHealingWatch(client dynamic.Interface, gvr schema.GroupVersionResource, opts metav1.ListOptions) *SelfHealingWatch { diff --git a/continuousscanning/watchbuilder_test.go b/continuousscanning/watchbuilder_test.go index 11bea5b..92dbcac 100644 --- a/continuousscanning/watchbuilder_test.go +++ b/continuousscanning/watchbuilder_test.go @@ -28,10 +28,10 @@ func assertWatchAction(t *testing.T, gotAction ktest.Action, wantGVR schema.Grou func TestNewDynamicWatch(t *testing.T) { tt := []struct { - name string + wantErr error inputGVR schema.GroupVersionResource + name string wantActions []ktest.Action - wantErr error }{ { name: "",