Skip to content

Commit a8d041d

Browse files
committed
add documentation for verify-api-groups
1 parent 519dd78 commit a8d041d

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

contributors/devel/sig-testing/verify-tests.md

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
- [Verification Tests](#verification-tests)
66
- [Overview](#overview)
77
- [Note](#note)
8-
- [`verify-govet-levee`](#verify-govet-leve)
8+
- [verify-govet-levee](#verify-govet-leve)
9+
- [verify-api-groups](#verify-api-groups)
910

1011
## Overview
1112

@@ -81,3 +82,26 @@ In order of decreasing preference:
8182

8283
Analysis configuration can be found at [kubernetes/kubernetes/hack/testdata/levee/levee-config.yaml](https://github.com/kubernetes/kubernetes/blob/master/hack/testdata/levee/levee-config.yaml).
8384
Contact SIG-Security with any additional questions.
85+
86+
### `verify-api-groups`
87+
88+
This verification script validates the different api-groups by reading
89+
the respective `register.go` file. Every register file must contain a
90+
GroupName. Another check which is performed when this script runs is
91+
to ensure that all types have client code generated for them, except
92+
types that belong to groups not served from the API server (defined in
93+
this script via the bash array `groups_without_codegen`).
94+
95+
Next, the script compares the `GroupName`s against
96+
`import_known_versions` to ensure the import packages will get
97+
installed. We list out packages which are required without
98+
installation along with importing `known_version`. Then we do a search
99+
for packages that reqiure installation on the basis of
100+
`packages_without_installation`. We verify if file is a
101+
`known_version_file` or not only if an `expected_install_package` is
102+
present in it.
103+
104+
Finally the script checks that all external group versions
105+
(e.g. `foobar/v1`) are defined in `hack/lib/init.sh` in either the
106+
`KUBE_AVAILABLE_GROUP_VERSIONS` or `KUBE_NONSERVER_GROUP_VERSIONS`
107+
bash variables.

0 commit comments

Comments
 (0)