-
Notifications
You must be signed in to change notification settings - Fork 356
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 failing EmsContainerControllerSpec #7051
Fix failing EmsContainerControllerSpec #7051
Conversation
@@ -71,7 +71,7 @@ | |||
EvmSpecHelper.create_guid_miq_server_zone | |||
# set kubeclient to return a mock route. | |||
allow(Kubeclient::Client).to receive(:new).and_return(mock_client) | |||
expect(mock_client).to receive(:discover) | |||
expect(mock_client).to receive(:discover).twice |
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.
I'd rather go with:
expect(mock_client).to receive(:discover).twice | |
expect(mock_client).to receive(:discover).at_least(:once) |
as this is a mock and the amount of discover
might change in the future.
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.
Also if we're using allow
above, it's pointless to have an expect
here...
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.
Fixed.
0b776e7
to
e9c12b2
Compare
Checked commit mzazrivec@e9c12b2 with ruby 2.5.7, rubocop 0.69.0, haml-lint 0.28.0, and yamllint |
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.
Fix failing EmsContainerControllerSpec (cherry picked from commit 81d4bdd)
Jansa backport details:
|
Fixing the following failure: