MCPcopy Create free account
hub / github.com/NVIDIA/gpu-operator / makeTestNode

Function makeTestNode

internal/validator/validator_test.go:84–94  ·  view source on GitHub ↗
(opts ...nodeOptions)

Source from the content-addressed store, hash-verified

82type nodeOptions func(*corev1.Node)
83
84func makeTestNode(opts ...nodeOptions) *corev1.Node {
85 n := &corev1.Node{
86 ObjectMeta: metav1.ObjectMeta{
87 Name: testNodeName,
88 },
89 }
90 for _, o := range opts {
91 o(n)
92 }
93 return n
94}
95
96func TestCheckNodeSelector(t *testing.T) {
97 node := makeTestNode(labelled(map[string]string{"os-version": "ubuntu20.04"}))

Callers 1

TestCheckNodeSelectorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected