MCPcopy Create free account
hub / github.com/cozystack/cozystack / TestWalkingOwnershipGraph

Function TestWalkingOwnershipGraph

pkg/lineage/lineage_test.go:87–96  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

85}
86
87func TestWalkingOwnershipGraph(t *testing.T) {
88 obj, err := dynClient.Resource(schema.GroupVersionResource{"", "v1", "pods"}).Namespace(os.Args[1]).Get(ctx, os.Args[2], metav1.GetOptions{})
89 if err != nil {
90 t.Fatal(err)
91 }
92 nodes := WalkOwnershipGraph(ctx, dynClient, mapper, &labelsMapper{}, obj)
93 for _, node := range nodes {
94 fmt.Printf("%#v\n", node)
95 }
96}

Callers

nothing calls this directly

Calls 2

WalkOwnershipGraphFunction · 0.85
GetMethod · 0.65

Tested by

no test coverage detected