Commit graph

11 commits

Author SHA1 Message Date
dom4ha
72d770c679 Convert DisruptionMode from enum to struct 2026-05-22 12:50:19 +00:00
dom4ha
88948acc38 Remove v1alpha2 API definitions
Update client-go lister and informer imports to v1alpha3
2026-05-22 12:50:19 +00:00
dom4ha
6404ddc2b7 Add generated files for v1alpha3
Run code generation for v1alpha3
2026-05-22 12:50:18 +00:00
Kubernetes Prow Robot
42203f13fd
Merge pull request #139198 from yongruilin/dv-test-owners
chore: add OWNERS to test/declarative_validation
2026-05-21 02:30:44 +05:30
yongruilin
b7d52daa7b chore: add OWNERS to test/declarative_validation
Add OWNERS file under test/declarative_validation to ensure only API reviewers and approvers have authority over these tests.
2026-05-20 19:12:25 +00:00
Yongrui Lin
44f6df54da Drop legacy hand-written validation subtest from pkg/api/testing
With DV always enforced, the "hand written validation" subtest (which
set DeclarativeValidation=off and emulated 1.35) now exercises the
same code path as "Beta disabled". Remove it along with the
MinEmulationVersion option, the WithMinEmulationVersion helper,
deDuplicateErrors, and the now-tautological imperative-vs-declarative
equivalence checks.
2026-05-20 18:54:07 +00:00
Yongrui Lin
c50ef6e64c test/declarative_validation: add hand-written Scale equivalence tests
Add declarative_validation_test.go under autoscaling/scale/ and apps/scale/
that invoke ValidateScaleUpdate via VerifyUpdateValidationEquivalenceFunc.
The tests observe the rules declared by the generated fixtures, satisfying
AssertDeclarativeCoverage for autoscaling/v1.Scale, apps/v1beta1.Scale,
and apps/v1beta2.Scale.
2026-05-13 20:35:04 +00:00
Yongrui Lin
87a1f97c90 test/declarative_validation: drop Scale allowlist exemptions and regen
Remove the autoscaling/v1.Scale, apps/v1beta1.Scale, and apps/v1beta2.Scale
entries from coverage-allowlist.yaml, then regenerate declarative-validation
test fixtures so the corresponding RegisterDeclaredRules calls and TestMain
files are emitted under autoscaling/scale/ and apps/scale/.
2026-05-13 20:08:14 +00:00
Yongrui Lin
e35569096e Rename validation-gen test fixtures to zz_generated.validations.* prefix
Mechanical rename to match the new --test-output-file-prefix value;
file contents are unchanged.
2026-05-12 20:31:33 +00:00
Yongrui Lin
a791288d81 test/declarative_validation: migrate DV equivalence tests to new tree
Move the existing declarative_validation_test.go files out of
pkg/registry/ into a top-level tree at
test/declarative_validation/<group>/<kind>/. The new location pairs
each hand-written test with the per-Kind TestMain and version-init
files emitted by validation-gen, so the coverage gate runs alongside
the equivalence checks and apiVersions no longer needs to be
hand-maintained.
2026-05-09 19:11:01 +00:00
Yongrui Lin
daae4100a6 hack: enable coverage fixture generation in update-codegen.sh
Pass -test-output-root and -test-allowlist to validation-gen so the
per-Kind coverage fixtures regenerate alongside the validators. Add the
allowlist YAML at test/declarative_validation/coverage-allowlist.yaml.
2026-05-09 19:11:01 +00:00