certman-operator
certman-operator copied to clipboard
Reapply "Merge pull request #295 from YiqinZhang/sdcicd1328-new"
Reopening the changes that were originally merged in PR #295 by commit 57eb3332 for further review.
- Add the osde2e test harness and migrated tests from osde2e. This includes improvements to the tests to not depend on osde2e.
- Modified manager.Options to have no specified namespace and port.
$ make lint
...
main.go:1: : # github.com/openshift/certman-operator
./main.go:149:3: unknown field Namespace in struct literal of type manager.Options
./main.go:151:3: unknown field Port in struct literal of type manager.Options
./main.go:156:3: unknown field MetricsBindAddress in struct literal of type manager.Options
./main.go:164:11: options.Namespace undefined (type manager.Options has no field or method Namespace)
./main.go:165:28: undefined: cache.MultiNamespacedCacheBuilder (typecheck)
/*
make: *** [boilerplate/openshift/golang-osd-operator/standard.mk:186: go-check] Error 1
- Commented out the CertificateReques status assertion as it fails on controller-runtime v0.16.3. The test client does not update the status of the cert runtime object, likely due to the addition of the WithStatusSubresource() functionality.
- Change
ErrorftoLogfto pass the unit test below.
make test
...
--- FAIL: TestReconcile (0.63s)
--- FAIL: TestReconcile/reqeusts_a_new_cert (0.50s)
certificaterequest_controller_test.go:364: Reconcile() return error: certificaterequests.certman.managed.openshift.io "clustername-1313-primary-cert-bundle" not found. was one expected? false
--- FAIL: TestReconcile/handles_multiple_ingresses_and_cert_secrets (0.12s)
certificaterequest_controller_test.go:364: Reconcile() return error: certificaterequests.certman.managed.openshift.io "clustername-1313-primary-cert-bundle" not found. was one expected? false
Codecov Report
Attention: Patch coverage is 25.00000% with 3 lines in your changes missing coverage. Please review.
Project coverage is 48.61%. Comparing base (
51ff63b) to head (ecab382). Report is 7 commits behind head on master.
| Files with missing lines | Patch % | Lines |
|---|---|---|
| main.go | 0.00% | 2 Missing :warning: |
| ...ertificaterequest/certificaterequest_controller.go | 0.00% | 1 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## master #299 +/- ##
==========================================
+ Coverage 48.51% 48.61% +0.09%
==========================================
Files 28 28
Lines 2092 2088 -4
==========================================
Hits 1015 1015
+ Misses 970 966 -4
Partials 107 107
| Flag | Coverage Δ | |
|---|---|---|
48.61% <25.00%> (+0.09%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
| Files with missing lines | Coverage Δ | |
|---|---|---|
| controllers/certificaterequest/test_helpers.go | 70.00% <100.00%> (ø) |
|
| ...ertificaterequest/certificaterequest_controller.go | 35.49% <0.00%> (ø) |
|
| main.go | 0.00% <0.00%> (ø) |
/lgtm
/approve
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: anispate, clcollins, YiqinZhang
The full list of commands accepted by this bot can be found here.
The pull request process is described here
- ~~OWNERS~~ [clcollins]
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
@YiqinZhang: all tests passed!
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.