-
Notifications
You must be signed in to change notification settings - Fork 56
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
Fix unit test for controller #250
Comments
Right now after updating to new machine/v1beta and client API looks like the actuators unit test failing with following error ``` [...] --- FAIL: TestMachineEvents (0.03s) --- FAIL: TestMachineEvents/Create_machine_event_failed_(invalid_configuration) (0.00s) controller.go:137: missing call(s) to *mock.MockClient.Close() /go/src/github.com/openshift/cluster-api-provider-libvirt/pkg/cloud/libvirt/actuators/machine/actuator_test.go:193 controller.go:137: missing call(s) to *mock.MockClient.GetDHCPLeasesByNetwork(is anything) /go/src/github.com/openshift/cluster-api-provider-libvirt/pkg/cloud/libvirt/actuators/machine/actuator_test.go:198 controller.go:137: aborting test due to missing call(s) [...] ``` It need bit more time to figure out why it is failing and what changes need to be done to fix it or do we need a different way for unit test. Meanwhile this PR disable those test to make CI happy and take those api changes in so dependent project doesn't break. A follow up issue to track: openshift#250
I tested #251 with cluster-bot release image and it works, I will also add the nightly or ec bits which have this commit if someone wants to test it |
It's a bug in the unit test which became apparent after upgrading go-mock to its latest version.
It was only seeming to succeed because |
This allows the test to succeed but I'm unconvinced it's a great fix, this basically says "the mock interface expects all these methods to be called 0 or more times", this is not testing a lot. These expectations should probably be set per test-case rather than globally. |
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: Closing this issue. 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/test-infra repository. |
/reopen This is still not fixed. |
/lifecycle frozen |
@praveenkumar: Reopened this issue. 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/test-infra repository. |
With #249 the actuator tests are failing like below and this issue is to track so we can fix it later in time. As of now priority is to update latest machine api and vendoring part.
The text was updated successfully, but these errors were encountered: