Refactor sidecar validation to implement apis.Validatable.#8710
Conversation
9b1e82f to
f53931c
Compare
|
The following is the coverage report on the affected files.
|
f53931c to
c94395e
Compare
|
The following is the coverage report on the affected files.
|
|
The following is the coverage report on the affected files.
|
|
@binkkatal you can take a look but I would wait till #8685 is merged, then this PR will be much smaller. See pr message above. Thank you! |
c94395e to
77a7a7a
Compare
Add `SidecarList` with a `Validate` method and implemented a `Validate` method on `Sidecar`. Put both Sidecar tests into one test function and move into `container_validation_test.go`. Remove `validateSidecars`, `validateSidecar`, switch to `Validate` method entirely and remove old tests. Issue tektoncd#8700. Signed-off-by: Stanislav Jakuschevskij <[email protected]>
77a7a7a to
2e56a9d
Compare
|
/cc @waveywaves This one is ready for review. It's a small refactor of the sidecar validation, see my short description above. Thank you for the review! 😸 |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: vdemeester, waveywaves The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/lgtm |
Changes
As a follow up to #8685 in this small PR the
Sidecarvalidation is refactored to align with the pattern used inpipeline_validation.go, task_validation.go, result_validation.go, etc.meaning implementing theapis.Validatableinterface and using a custom type for a list ofSidecarsnamelySidecarList.Now that the
Sidecarvalidation has a publicValidateAPI, the tests for it were moved fromtask_validation_test.gotocontainer_validation_test.gowhich also improves coverage.Issue #8700.
/kind cleanup
Submitter Checklist
As the author of this PR, please check off the items in this checklist:
/kind <type>. Valid types are bug, cleanup, design, documentation, feature, flake, misc, question, tepRelease Notes