(opts ...nodeOptions)
| 82 | type nodeOptions func(*corev1.Node) |
| 83 | |
| 84 | func 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 | |
| 96 | func TestCheckNodeSelector(t *testing.T) { |
| 97 | node := makeTestNode(labelled(map[string]string{"os-version": "ubuntu20.04"})) |
no outgoing calls
no test coverage detected