func makeTestPod(namespace, name, node string, mirror bool) (*api.Pod, *corev1.Pod) { … } func withLabels(pod *api.Pod, labels map[string]string) *api.Pod { … } func makeTestPodEviction(name string) *policy.Eviction { … } func makeTokenRequest(podname string, poduid types.UID) *authenticationapi.TokenRequest { … } func setAllLabels(node *api.Node, value string) *api.Node { … } func setAllowedCreateLabels(node *api.Node, value string) *api.Node { … } func setAllowedUpdateLabels(node *api.Node, value string) *api.Node { … } func setForbiddenCreateLabels(node *api.Node, value string) *api.Node { … } func setForbiddenUpdateLabels(node *api.Node, value string) *api.Node { … } type admitTestCase … func (a *admitTestCase) run(t *testing.T) { … } func Test_nodePlugin_Admit(t *testing.T) { … } func Test_nodePlugin_Admit_OwnerReference(t *testing.T) { … } func Test_getModifiedLabels(t *testing.T) { … } func TestAdmitPVCStatus(t *testing.T) { … } func makeTestPVC( condition api.PersistentVolumeClaimConditionType, allocatedResources string, resizeStatus *api.ClaimResourceStatus) *api.PersistentVolumeClaim { … } func createPodAttributes(pod *api.Pod, user user.Info) admission.Attributes { … } func createCSRAttributes(cn, signer string, validCsr bool, key any, user user.Info) admission.Attributes { … } func TestAdmitResourceSlice(t *testing.T) { … }