MCPcopy
hub / github.com/kubernetes/client-go / getArbitraryResource

Function getArbitraryResource

testing/fixture_test.go:37–53  ·  view source on GitHub ↗
(s schema.GroupVersionResource, name, namespace string)

Source from the content-addressed store, hash-verified

35)
36
37func 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
55func TestWatchCallNonNamespace(t *testing.T) {
56 testResource := schema.GroupVersionResource{Group: "", Version: "test_version", Resource: "test_kind"}

Callers 6

TestWatchAddAfterStopFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected