-
Notifications
You must be signed in to change notification settings - Fork 2
Smoke tests for the Google CAS issuer #62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
maelvls
wants to merge
14
commits into
main
Choose a base branch
from
smoke-tests-google-cas
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Maël Valais <[email protected]>
Signed-off-by: Maël Valais <[email protected]>
For some reason, the Application that we have had a field that does not exist on the v1beta1 spec. More specifically, we had: apiVersion: app.k8s.io/v1beta1 kind: Application spec: descriptor: ... info: [] It should have been: apiVersion: app.k8s.io/v1beta1 kind: Application spec: descriptor: ... info: [] It seems like when Google upgraded [1] the Application CRD from v1beta1 to v1 (this in the version of the CRD object, not the version of the Application itself). After this change, the above Application manifest could not be applied anymore. The error looked like this: error: error validating "/data/resources.yaml": error validating data: ValidationError(Application.spec.descriptor): unknown field "info" in io.k8s.app.v1beta1.Application.spec.descriptor; if you choose to ignore these errors, turn validation off with --validate=false My guess is that before this change, the faulty "info" field was not being validated, and the new v1 CRD version started validating it. [1]: GoogleCloudPlatform/marketplace-k8s-app-tools#562 Signed-off-by: Maël Valais <[email protected]>
Signed-off-by: Maël Valais <[email protected]>
Signed-off-by: Maël Valais <[email protected]>
…imitations Signed-off-by: Maël Valais <[email protected]>
Signed-off-by: Maël Valais <[email protected]>
Signed-off-by: Maël Valais <[email protected]>
Signed-off-by: Maël Valais <[email protected]>
Signed-off-by: Maël Valais <[email protected]>
I went with cram because it gives excellent stderr and stdout diagnostic in case of error. You can run it locally with: docker build --file smoke-test.Dockerfile -t runner . docker run -it -v ~/.kube:/root/.kube -v $PWD:/opt runner cram smoke-test.t To update the stdout/stderr and status codes interactively, run: docker run -it -v ~/.kube:/root/.kube -v $PWD:/opt runner cram smoke-test.t -i Signed-off-by: Maël Valais <[email protected]>
Running stern immediately (kubectl logs was giving similar results), the following error would show: Error: failed to set up watch: failed to set up watch: unknown (get pods) To get around this issue, the logs are now only fetched on error. Signed-off-by: Maël Valais <[email protected]>
Signed-off-by: Maël Valais <[email protected]>
@maelvls: PR needs rebase. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Up to today, we only tested that we can create a GoogleCASIssuer and GoogleCASClusterIssuer, but we did not test the actual issuance due to limitations with the
testrunner
. We said in #19 that we want to smoke test the CAS. Now that we moved to our own bash-like tests (see smoke-test.t), we can confidently add more tests.This PR implements these new test cases.
TBD:
mpdev verify
. If they can't, then there is no point in adding these tests since we won't be able to pass the Google automated validation.