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

Fix change node type #263

Closed
wants to merge 3 commits into from
Closed

Fix change node type #263

wants to merge 3 commits into from

Conversation

linuxdynasty
Copy link

This will fix the action change_node_type and as well not break on a 2nd run, since provider expected that a ram type will always be in the output of cluster_status

…. This action would fail each time it tried to change the cluster type. Once I changed it to each, it now performed the task correctly
…disc

type, this would break on a second run of chef-client. I made sur ethat
it validated if it indeed found a ram or a disc type
@odolbeau
Copy link

👍

@odolbeau
Copy link

odolbeau commented Jun 1, 2015

Hi @linuxdynasty!

Can you please update your PR to replace result = [] by [] (2 occurrences)?
@jjasghar what do you mean by "Need a spec"?

@jjasghar
Copy link
Contributor

jjasghar commented Jun 2, 2015

@odolbeau by spec i mean a chefspec or integration test. I don't merge any new feature or change without a corresponding test.

@odolbeau
Copy link

odolbeau commented Jun 3, 2015

I take a look at tests. For now it seems there is very few tests related to the cluster part.
Testing this bug correction means testing the whole cluster part which is pretty hard to achieve. :/

@@ -89,7 +93,11 @@ def disc_nodes(cluster_status)
pattern = '({disc,\[)(.*?)(\]})'
result = match_pattern_cluster_status(cluster_status, pattern)
Chef::Log.debug("[rabbitmq_cluster] disc_nodes : #{result}")
result.split(',')
if result.nil?
result = []
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rubocop doesn't like this :(

@jjasghar
Copy link
Contributor

I'm going to close this due to no activity.

@jjasghar jjasghar closed this Oct 21, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants