Skip to content

Conversation

@cgwalters
Copy link
Member

@cgwalters cgwalters commented Sep 6, 2022

The idea of unit testing things is laudable. We've been carrying around this "NodeUpdaterClient" abstraction for a long time that tries to abstract over rpm-ostree as well as having a dummy/mock backend for unit tests.

The unit test case...never really did much. The code has tons of direct calls to rpm-ostree. Fully mocking all of that out would be possible, but has never been done.

I don't think doing that mocking is worth it versus having efficient end-to-end testing in a real environment.

Drop it, in preparation for fully dropping the NodeUpdaterClient abstraction API in favor of direct calls to
https://github.com/cgwalters/rpmostree-client-go

The idea of unit testing things is laudable.  We've been
carrying around this "NodeUpdaterClient" abstraction for a long
time that tries to abstract over rpm-ostree as well as having
a dummy/mock backend for unit tests.

The unit test case...never really did much.  The code has *tons*
of direct calls to rpm-ostree.  Fully mocking all of that out
would be possible, but has never been done.

I don't think doing that mocking is worth it versus having efficient
end-to-end testing in a real environment.

Drop it, in preparation for fully dropping the `NodeUpdaterClient`
abstraction API in favor of direct calls to
https://github.com/cgwalters/rpmostree-client-go
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 6, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Sep 7, 2022

@cgwalters: all tests passed!

Full PR test history. Your PR dashboard.

Details

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. I understand the commands that are listed here.

@sinnykumari
Copy link
Contributor

+1 for this cleanup
/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Sep 7, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Sep 7, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cgwalters, sinnykumari

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [cgwalters,sinnykumari]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-robot openshift-merge-robot merged commit 85e8c14 into openshift:master Sep 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants