-
Notifications
You must be signed in to change notification settings - Fork 192
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
OCPBUGS-29894: Add test verifying that routers without the required CRLs are marked not ready #1053
base: master
Are you sure you want to change the base?
Conversation
@rfredette: This pull request references Jira Issue OCPBUGS-29894, which is valid. The bug has been moved to the POST state. 3 validation(s) were run on this bug
Requesting review from QA contact: The bug has been updated to refer to the pull request using the external bug tracker. In response to this:
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 openshift-eng/jira-lifecycle-plugin repository. |
@rfredette: This pull request references Jira Issue OCPBUGS-29894, which is valid. 3 validation(s) were run on this bug
Requesting review from QA contact: In response to this:
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 openshift-eng/jira-lifecycle-plugin repository. |
07a0f76
to
e12ad7b
Compare
/assign |
Issues go stale after 90d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle stale |
/remove-lifecycle stale |
e12ad7b
to
8e39bd5
Compare
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
As noted in openshift/router#595 (review), I think we need an alert. Would it make sense to include that in this PR? |
test/e2e/client_tls_test.go
Outdated
Namespace: namespaceName, | ||
} | ||
// When generating certificates, the CRL distribution points need to be specified by URL | ||
crlHostServiceName := names.SimpleNameGenerator.GenerateName("crl-host-service-") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it useful to use a new generated name here, as opposed to using crlHostName.Name + "-service"
or even just crlHostName.Name
? Similarly, I think crlConfigMapName
below could be generated as fmt.Sprintf("%s-%s", crlHostName.Name, name)
, and clientCAConfigmapName
and icName
could use the same prefix. I imagine tracing the test or diagnosing failures would be easier if it used the same prefix when naming resources related to the same test case.
Then there are clientCertsConfigmap
, podName
, echoPod
, etc., but maybe it makes more sense for some of those to have distinct prefixes. That is, the echo pod, echo route, and echo service can (and do) share a prefix, but a different prefix from crlConfigMapName
etc.
If I'm missing something or you find the current approach easier to follow, feel free to ignore this suggestion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I took the brute force approach to make sure there were no name conflicts when the subtests are run in parallel, but I agree, it'd be better be able to identify which resources are a part of the same subtest.
// Generate CRLs. Offset the expiration times by 1 minute each so that we can verify that only the correct CRLs get updated at each expiration. | ||
currentCRLs := map[string]*x509.RevocationList{} | ||
crlPems := map[string]string{} | ||
caBundle := []string{} | ||
validTime := 3 * time.Minute | ||
//expirations := []time.Time{} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Debug code?
for i := range testCases { | ||
tc := testCases[i] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the point of this change? Did you mean to use tc := &testCases[i]
to avoid copying the whole test case? Even that would be an unnecessary micro-optimization for test code, in my opinion, but I don't understand the purpose of writing for i := range testCases
/ tc := testCases[i]
instead of keeping the original for _, tc := range testCases
at all.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for _, tc := range testCases
isn't thread safe. I initially had it that way, but once t.Parallel()
was called, tc
in all threads converged on the last test case in the list.
f62a85a
to
2536ff0
Compare
Modify TestMTLSWithCRLs and TestCRLUpdate so that the subtests of each test can be run in parallel.
TestRouterWaitsForCRLs verifies that the router reports not ready until all required CRLs are downloaded This is part of the fix for OCPBUGS-29894
2536ff0
to
258b656
Compare
@rfredette: The following tests failed, say
Full PR test history. Your PR dashboard. 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-sigs/prow repository. I understand the commands that are listed here. |
The new test should fail until openshift/router#595 is merged.
This is part of the fix for OCPBUGS-29894