Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: tkong-redhat The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #395 +/- ##
=======================================
Coverage 72.44% 72.44%
=======================================
Files 11 11
Lines 704 704
=======================================
Hits 510 510
Misses 173 173
Partials 21 21 🚀 New features to boost your workflow:
|
test/e2e/test_helpers.go
Outdated
| return sfv1alpha1.SplunkForwarder{ | ||
| ObjectMeta: metav1.ObjectMeta{ | ||
| Name: name, | ||
| Namespace: operatorNamespace, |
There was a problem hiding this comment.
My local language server is saying that operatorNamespace is undefined, is there some e2e harness trickery going on with it?
There was a problem hiding this comment.
This file and e2e test are in the same package, so they share the same global variables.
However, thanks for pointing out. I have made the namespace as a parameter for better practice. Please check.
test/e2e/test_helpers.go
Outdated
| // generateSelfSignedCACert returns a PEM-encoded self-signed CA cert for testing | ||
| // This is a minimal test certificate - sufficient for testing secret mounting | ||
| func generateSelfSignedCACert() string { | ||
| return `-----BEGIN CERTIFICATE----- |
There was a problem hiding this comment.
Is there any way to generate these dynamically with crypto/x509 or crypto/tls instead of inlining the string?
There was a problem hiding this comment.
+1 or add comments about what these certs contain, when they expire, and how they can be regenerated when authoring/fixing tests.
Might also be more readable and less objectionable with the blobs in separate test-data files and read in by the function, if possible.
There was a problem hiding this comment.
Thank you for review. I've updated the code to dynamically generate the certs for 1 month for tests. Those certs will be removed after tests.
Please have a look.
06294a4 to
9c4b5d4
Compare
|
@tkong-redhat: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions 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. |
Adding more e2e tests for the following scenarios
Tests have been tested locally and in e2e image. Both passed without error.
SREP-3019
Assisted by Claude code