Skip to content
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

Update helper.rb #13

Merged
merged 3 commits into from
Feb 20, 2014
Merged

Update helper.rb #13

merged 3 commits into from
Feb 20, 2014

Conversation

autrejacoupa
Copy link
Contributor

fix_device_mapping should return nil where fixed_device does not match /dev/xvd. This should fix creating ephemeral for m2.2xlarge.

fix_device_mapping should return nil where fixed_device does not match /dev/xvd. This should fix creating ephemeral for m2.2xlarge.
@rs-cookbooks-ci
Copy link

Can one of the admins verify this patch?

@douglaswth
Copy link
Contributor

@rs-cookbooks-ci test this please

@douglaswth
Copy link
Contributor

@autrejacoupa could you fix the spec so that it tests this behavior. I think it should be as easy as adding an and_return with whatever Chef::Log.warn might return to the "skips the devices that cannot be mapped" one.

Update the test case to make sure Chef:Log return is not added to the list of devices.
@autrejacoupa
Copy link
Contributor Author

@douglaswth regarding spec, not sure how to mock what Chef client on runtime was returning, which is /dev/xvdb and more stuff : ["/dev/xvdb", [#<Logger:0x00000003282000 progname=nil, level=2, default_formatter=...........mon_mutex=#Mutex:0x00000003281a10>>>]]. I did change the spec "skips the devices that cannot be mapped" so that log output does not get into the array of return devices. Thanks

@douglaswth
Copy link
Contributor

It looks like what Chef::Log.warn returns is an array, so could you have it just return an empty array instead?

Chef:Log:warn returns array, make sure that array is not part of device list.
@autrejacoupa
Copy link
Contributor Author

Done

@douglaswth
Copy link
Contributor

@rs-cookbooks-ci test this please

@douglaswth
Copy link
Contributor

@rs-cookbooks-ci test this please, and don't fail for weird test-kitchen/vagrant bugs this time, please 😦

douglaswth added a commit that referenced this pull request Feb 20, 2014
fix_device_mapping should return nil where fixed_device does not match /dev/xvd. This should fix creating ephemeral for m2.2xlarge.
@douglaswth douglaswth merged commit de2d586 into rightscale-cookbooks:master Feb 20, 2014
@autrejacoupa autrejacoupa deleted the patch-1 branch February 20, 2014 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants