(s schema.GroupVersionResource, name, namespace string)
| 35 | ) |
| 36 | |
| 37 | func getArbitraryResource(s schema.GroupVersionResource, name, namespace string) *unstructured.Unstructured { |
| 38 | return &unstructured.Unstructured{ |
| 39 | Object: map[string]interface{}{ |
| 40 | "kind": s.Resource, |
| 41 | "apiVersion": s.Version, |
| 42 | "metadata": map[string]interface{}{ |
| 43 | "name": name, |
| 44 | "namespace": namespace, |
| 45 | "generateName": "test_generateName", |
| 46 | "uid": "test_uid", |
| 47 | "resourceVersion": "test_resourceVersion", |
| 48 | "selfLink": "test_selfLink", |
| 49 | }, |
| 50 | "data": strconv.Itoa(rand.Int()), |
| 51 | }, |
| 52 | } |
| 53 | } |
| 54 | |
| 55 | func TestWatchCallNonNamespace(t *testing.T) { |
| 56 | testResource := schema.GroupVersionResource{Group: "", Version: "test_version", Resource: "test_kind"} |
no outgoing calls
no test coverage detected