Conversation
| @@ -247,75 +247,3 @@ func TestAdditionalImageCollector(t *testing.T) { | |||
| assert.ElementsMatch(t, expected, res) | |||
| }) | |||
| } | |||
There was a problem hiding this comment.
It is really nice to reuse the mock from other packages instead of duplicating them.
+1
| // Code generated by MockGen. DO NOT EDIT. | ||
| // Source: ./interface.go | ||
| // | ||
| // Generated by this command: | ||
| // | ||
| // mockgen -source=./interface.go -destination=./mock/interface_generated.go -package=mock | ||
| // | ||
|
|
||
| // Package mock is a generated GoMock package. |
There was a problem hiding this comment.
Generating the mock automatically based on the interface is really a big win.
+1
|
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 |
|
@r4f4 I really like this approach and I think oc-mirror could benefit a lot from it. Is there anything missing that we can do to have it merged ? |
Other than rebasing, I think it depends on what we want out of this PR. I just did it for one test file as an example but there still a lot of work to do it for the rest. |
|
Got it @r4f4, so maybe we can get this merged and use it as an example to migrate the older tests (it does not need to be all at once) and when creating new ones. What do you think about it @lmzuccarelli ? |
|
@r4f4 - could you rebase and once passing we can merge |
|
Stale issues rot after 30d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle rotten |
|
/remove-lifecycle rotten |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: r4f4 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
This should make it easier to write dynamic mocks in unit tests.
|
PR needs rebase. 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. |
|
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 |
|
Stale issues rot after 30d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle rotten |
|
Rotten issues close after 30d of inactivity. Reopen the issue by commenting /close |
|
@openshift-bot: Closed this PR. DetailsIn 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 kubernetes-sigs/prow repository. |
|
Reopening this PR since this is something we would like to have in future. /lifecycle frozen cc: @r4f4 |
|
@aguidirh: The DetailsIn 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 kubernetes-sigs/prow repository. |
|
Important Review skippedAuto reviews are limited based on label configuration. 🚫 Review skipped — only excluded labels are configured. (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
@r4f4: The following tests failed, say
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. |
Description
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Github / Jira issue:
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration.
Expected Outcome
Please describe the outcome expected from the tests.