(t *testing.T)
| 129 | } |
| 130 | |
| 131 | func TestWatchCallMultipleInvocation(t *testing.T) { |
| 132 | cases := []struct { |
| 133 | name string |
| 134 | op watch.EventType |
| 135 | ns string |
| 136 | }{ |
| 137 | { |
| 138 | "foo", |
| 139 | watch.Added, |
| 140 | "test_namespace", |
| 141 | }, |
| 142 | { |
| 143 | "bar", |
| 144 | watch.Added, |
| 145 | "test_namespace", |
| 146 | }, |
| 147 | { |
| 148 | "baz", |
| 149 | watch.Added, |
| 150 | "", |
| 151 | }, |
| 152 | { |
| 153 | "bar", |
| 154 | watch.Modified, |
| 155 | "test_namespace", |
| 156 | }, |
| 157 | { |
| 158 | "baz", |
| 159 | watch.Modified, |
| 160 | "", |
| 161 | }, |
| 162 | { |
| 163 | "foo", |
| 164 | watch.Deleted, |
| 165 | "test_namespace", |
| 166 | }, |
| 167 | { |
| 168 | "bar", |
| 169 | watch.Deleted, |
| 170 | "test_namespace", |
| 171 | }, |
| 172 | { |
| 173 | "baz", |
| 174 | watch.Deleted, |
| 175 | "", |
| 176 | }, |
| 177 | } |
| 178 | |
| 179 | scheme := runtime.NewScheme() |
| 180 | codecs := serializer.NewCodecFactory(scheme) |
| 181 | testResource := schema.GroupVersionResource{Group: "", Version: "test_version", Resource: "test_kind"} |
| 182 | |
| 183 | o := NewObjectTracker(scheme, codecs.UniversalDecoder()) |
| 184 | watchNamespaces := []string{ |
| 185 | "", |
| 186 | "", |
| 187 | "test_namespace", |
| 188 | "test_namespace", |
nothing calls this directly
no test coverage detected