kubernetes/staging/src/k8s.io/pod-security-admission/admission/admission_test.go

func TestDefaultExtractPodSpec(t *testing.T) {}

func TestDefaultHasPodSpec(t *testing.T) {}

type testEvaluator

func (t *testEvaluator) EvaluatePod(lv api.LevelVersion, meta *metav1.ObjectMeta, spec *corev1.PodSpec) []policy.CheckResult {}

type testNamespaceGetter

func (t testNamespaceGetter) GetNamespace(ctx context.Context, name string) (*corev1.Namespace, error) {}

type testPodLister

func (t *testPodLister) ListPods(ctx context.Context, namespace string) ([]*corev1.Pod, error) {}

func TestValidateNamespace(t *testing.T) {}

func TestValidatePodAndController(t *testing.T) {}

type FakeRecorder

type MetricsRecord

func (r *FakeRecorder) RecordEvaluation(decision metrics.Decision, policy api.LevelVersion, evalMode metrics.Mode, attrs api.Attributes) {}

func (r *FakeRecorder) RecordExemption(attrs api.Attributes) {}

func (r *FakeRecorder) RecordError(_ bool, attrs api.Attributes) {}

func TestPrioritizePods(t *testing.T) {}

func TestExemptNamespaceWarning(t *testing.T) {}

type testAttributes

func (a *testAttributes) GetObject() (runtime.Object, error) {}

func (a *testAttributes) GetOldObject() (runtime.Object, error) {}