-
Notifications
You must be signed in to change notification settings - Fork 153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Minor fixes for #3219 #3231
Minor fixes for #3219 #3231
Conversation
Pull Request Test Coverage Report for Build 12455287120Details
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added inline comments
Please also fix lines 3132-3133
@@ -3067,7 +3067,7 @@ Version: 1.2.3`) | |||
Expect(err).ToNot(HaveOccurred()) | |||
Expect(kv.Spec.Infra).To(Not(BeNil())) | |||
Expect(kv.Spec.Infra.Replicas).To(Not(BeNil())) | |||
Expect(*kv.Spec.Infra.Replicas).To(Equal(uint8(1))) | |||
Expect(*kv.Spec.Infra.Replicas).To(HaveValue(Equal(uint8(1)))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
HaveValue
is working on the pointer - not the value.
Expect(*kv.Spec.Infra.Replicas).To(HaveValue(Equal(uint8(1)))) | |
Expect(kv.Spec.Infra.Replicas).To(HaveValue(Equal(uint8(1)))) |
@@ -3022,7 +3022,7 @@ Version: 1.2.3`) | |||
kv, err := NewKubeVirt(hco) | |||
Expect(err).ToNot(HaveOccurred()) | |||
Expect(kv.Spec.Infra).To(Not(BeNil())) | |||
Expect(*kv.Spec.Infra.Replicas).To(Equal(uint8(1))) | |||
Expect(*kv.Spec.Infra.Replicas).To(HaveValue(Equal(uint8(1)))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same
@@ -3108,7 +3108,7 @@ Version: 1.2.3`) | |||
Expect(err).ToNot(HaveOccurred()) | |||
Expect(kv.Spec.Infra).To(Not(BeNil())) | |||
Expect(kv.Spec.Infra.Replicas).To(Not(BeNil())) | |||
Expect(*kv.Spec.Infra.Replicas).To(Equal(uint8(1))) | |||
Expect(*kv.Spec.Infra.Replicas).To(HaveValue(Equal(uint8(1)))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line 3110 is not needed anymore
@@ -3067,7 +3067,7 @@ Version: 1.2.3`) | |||
Expect(err).ToNot(HaveOccurred()) | |||
Expect(kv.Spec.Infra).To(Not(BeNil())) | |||
Expect(kv.Spec.Infra.Replicas).To(Not(BeNil())) | |||
Expect(*kv.Spec.Infra.Replicas).To(Equal(uint8(1))) | |||
Expect(*kv.Spec.Infra.Replicas).To(HaveValue(Equal(uint8(1)))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line 3069 is not needed when using HaveValue
1. fix comment (should be masters instead of workers) 2. use HaveValue matcher in unit tests. Signed-off-by: Oren Cohen <[email protected]>
fb63604
to
eacf86c
Compare
Quality Gate passedIssues Measures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: nunnatsa The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
// scheduled onto worker nodes. | ||
// In case there are no control plane / master nodes in the cluster, we're setting | ||
// an empty struct for NodePlacement so that kubevirt control plane pods won't have | ||
// any affinity rules, and they could get scheduled onto worker nodes. | ||
if hcoConfig.NodePlacement == nil && !controlPlaneNodeExists { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If comments are needed, it's probably because the code is too complex.
Please consider extracting the code to a properly named helper function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dankenigsberg I agree with you in general, but here, this is a bit complex explanation. Not sure how to fit it into a function name.
/test pull-hyperconverged-cluster-operator-unit-test-s390x |
@nunnatsa: The specified target(s) for
The following commands are available to trigger optional jobs:
Use
In 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. |
@openshift-ci[bot]: The specified target(s) for
The following commands are available to trigger optional jobs:
Use
In 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. |
hco-e2e-consecutive-operator-sdk-upgrades-aws lane succeeded. |
@hco-bot: Overrode contexts on behalf of hco-bot: ci/prow/hco-e2e-consecutive-operator-sdk-upgrades-azure In 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. |
hco-e2e-upgrade-prev-operator-sdk-aws lane succeeded. |
@hco-bot: Overrode contexts on behalf of hco-bot: ci/prow/hco-e2e-upgrade-prev-operator-sdk-azure In 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. |
hco-e2e-kv-smoke-gcp lane succeeded. |
@hco-bot: Overrode contexts on behalf of hco-bot: ci/prow/hco-e2e-kv-smoke-azure In 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. |
/retest |
@orenc1: The following tests failed, say
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. |
hco-e2e-upgrade-operator-sdk-aws lane succeeded. |
@hco-bot: Overrode contexts on behalf of hco-bot: ci/prow/hco-e2e-upgrade-operator-sdk-azure In 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. |
hco-e2e-operator-sdk-sno-aws lane succeeded. |
@hco-bot: Overrode contexts on behalf of hco-bot: ci/prow/hco-e2e-operator-sdk-sno-azure In 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. |
hco-e2e-upgrade-operator-sdk-sno-azure lane succeeded. |
@hco-bot: Overrode contexts on behalf of hco-bot: ci/prow/hco-e2e-upgrade-operator-sdk-sno-aws In 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. |
What this PR does / why we need it:
Reviewer Checklist
Jira Ticket:
Release note: