const newestMinorVersionToTest … const podOSBasedRestrictionEnabledVersion … type Options … func toJSON(pod *corev1.Pod) string { … } // checksForLevelAndVersion returns the set of check IDs that apply when evaluating the given level and version. // checks are assumed to be well-formed and valid to pass to policy.NewEvaluator(). // level must be api.LevelRestricted or api.LevelBaseline func checksForLevelAndVersion(checks []policy.Check, level api.Level, version api.Version) ([]policy.CheckID, error) { … } // computeVersionsToTest returns all the versions that have distinct checks defined, // all the versions that have distinct minimal valid pod fixtures defined, and // any hard-coded versions that should always be tested. // // This lets us sparsely test all versions with distinct fixture or policy changes // without needing to exercise every intermediate version that had no changes. func computeVersionsToTest(t *testing.T, checks []policy.Check) []api.Version { … } type testWarningHandler … func (t *testWarningHandler) HandleWarningHeader(code int, agent string, warning string) { … } func (t *testWarningHandler) FlushWarnings() []string { … } // and ensures pod fixtures expected to pass and fail against that level/version work as expected. func Run(t *testing.T, opts Options) { … } func DefaultCreateNamespace(client kubernetes.Interface, name string, labels map[string]string) (*corev1.Namespace, error) { … }