kubernetes/test/e2e/framework/internal/unittests/bugs
Patrick Ohly 08df776bc7 e2e framework: inject additional labels only once to leaf node
When a test depends on multiple feature gates, the labels that are derived from
those feature gates (Alpha, Beta, OffByDefault) potentially get injected
multiple times. This makes test names unnecessarily long and less
readable. This is going to get worse when also considering feature gate
dependencies.

The same is true for other meta labels: it's convenient to inject e.g.
"Serial" only once in a context, but it's nicer when it then shows up as
"[Serial"] at the end of the test name.

Now they get collected while registering tests and only injected once at the
end of the leaf node (= ginkgo.It).

An additional benefit is that graduating features or promoting tests to
conformance doesn't change the order of the -list-tests output or the order in
testgrid because the changes are all at the end of the full test name. It also
helps in testgrid because more of the actual test name text is visible in the
rather narrow test name column.
2026-01-09 11:00:14 +01:00
..
features e2e framework: add BetaDefaultOff feature gate testcase 2025-03-19 15:36:47 -07:00
bugs.go e2e framework: inject additional labels only once to leaf node 2026-01-09 11:00:14 +01:00
bugs_test.go fix: enable and fixes rules from testifylint on test package 2024-06-30 05:44:47 +00:00