Skip to content

Unable to construct AdmissionRequest #976

Answered by clux
andlaz asked this question in Q&A
Discussion options

You must be logged in to vote

Hey there! Yeah, you are right, this is quite possibly an oversight when constructing the api. We could just make it public to make unit testing easier 🤔

The normal flow pattern here (AdmissionReview input -> AdmissionRequest via TryInto -> AdmissionResponse via From/::invalid -> AdmissionReview via ::into_review) is not super practical for unit testing since it would just emulate what the function would do.

Going to move this to an issue Going to open a quick PR for more review. Thanks for the question!

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@clux
Comment options

clux Aug 6, 2022
Maintainer

@andlaz
Comment options

Answer selected by andlaz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants