Add unit tests for policies/yum.go#952
Add unit tests for policies/yum.go#952ganochenkodg wants to merge 4 commits intoGoogleCloudPlatform:masterfrom
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: ganochenkodg 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 |
|
Hi @ganochenkodg. Thanks for your PR. I'm waiting for a GoogleCloudPlatform member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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/test-infra repository. |
| rpmQueryArgs := []string{"--queryformat", `\{"architecture":"%{ARCH}","package":"%{NAME}","source_name":"%{SOURCERPM}","version":"%|EPOCH?{%{EPOCH}:}:{}|%{VERSION}-%{RELEASE}"\}` + "\n", "-a"} | ||
| yumCheckUpdateArgs := []string{"check-update", "--assumeyes"} | ||
| yumListUpdatesArgs := []string{"update", "--assumeno", "--color=never"} |
There was a problem hiding this comment.
Why don't we use existing variables defined in yum.go ?
There was a problem hiding this comment.
because we try to avoid changing the original code. they are placed in different package ("packages", not "policies") and start from small letters -> can't be imported without renaming. Should we update yum.go?
|
/gcbrun |
!!! Merge and review only after PR 949
Depends on expectedCommand and setExpectations from policies/policies_test.go
New test coverage:
github.com/GoogleCloudPlatform/osconfig/policies/yum.go:68: yumChanges 100.0%