-
Notifications
You must be signed in to change notification settings - Fork 203
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
Inconsistency in RSpec::Puppet::FunctionMatchers::Run's expected_result handling #266
Comments
Fixed in 2.2.0 |
openstack-gerrit
pushed a commit
to openstack-archive/fuel-library
that referenced
this issue
Oct 23, 2015
This change includes an update to rspec-puppet ~> 2.2 and adjusting the two tests that fail under 2.2 but not 2.1. I believe these failures are related to rodjek/rspec-puppet#266 The get_network_role_properly was previously passing because the return value was not be properly check. In the code we are returning eth0 as the interface for the admin network role and not nil. The get_transformation_property was previously passing because the return value was not correctly checked. Based on the code, the value for eth2 should have been 1024 while the value for eth3 would have been nil. This change updates the eth2 check with 1024 and adds a test case for eth3. Change-Id: I7b87d02d4c702dde68ecd7f4abcd304e686fa795 Closes-Bug: #1509056
xenolog
pushed a commit
to xenolog/l23network
that referenced
this issue
May 27, 2016
This change includes an update to rspec-puppet ~> 2.2 and adjusting the two tests that fail under 2.2 but not 2.1. I believe these failures are related to rodjek/rspec-puppet#266 The get_network_role_properly was previously passing because the return value was not be properly check. In the code we are returning eth0 as the interface for the admin network role and not nil. The get_transformation_property was previously passing because the return value was not correctly checked. Based on the code, the value for eth2 should have been 1024 while the value for eth3 would have been nil. This change updates the eth2 check with 1024 and adds a test case for eth3. FUEL-Change-Id: I7b87d02d4c702dde68ecd7f4abcd304e686fa795 FUEL-Closes-Bug: #1509056
xenolog
pushed a commit
to xenolog/l23network
that referenced
this issue
May 27, 2016
This change includes an update to rspec-puppet ~> 2.2 and adjusting the two tests that fail under 2.2 but not 2.1. I believe these failures are related to rodjek/rspec-puppet#266 The get_network_role_properly was previously passing because the return value was not be properly check. In the code we are returning eth0 as the interface for the admin network role and not nil. The get_transformation_property was previously passing because the return value was not correctly checked. Based on the code, the value for eth2 should have been 1024 while the value for eth3 would have been nil. This change updates the eth2 check with 1024 and adds a test case for eth3. FUEL-Change-Id: I7b87d02d4c702dde68ecd7f4abcd304e686fa795 FUEL-Closes-Bug: #1509056 Close: #182
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Please not the different error messages here:
I would have expected the second spec to say "have returned false instead of "false"".
Turns out that
RSpec::Puppet::FunctionMatchers::Run
is testingif @expected_result
atrspec-puppet/lib/rspec-puppet/matchers/run.rb
Line 109 in fe0b344
The simple solution of testing for
!@expected_result.nil?
will fail for the same reason, whennil
itself is passed as a value. A separate @expected_result_set member would alleviate this.The text was updated successfully, but these errors were encountered: