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

Supports setting rabbitmq config file to a different path #184

Merged
merged 1 commit into from
Dec 18, 2014

Conversation

wenchma
Copy link
Contributor

@wenchma wenchma commented Dec 15, 2014

issue #157
Fixes issue #157

@wenchma
Copy link
Contributor Author

wenchma commented Dec 15, 2014

The Travis CI build failed is not related with this change, it looks like other errors:
Running RuboCop...
Inspecting 56 files
.......................C..CCCCCC.CCCC...................
Offenses:
test/cookbooks/rabbitmq_test/files/default/tests/minitest/mgmt_console_test.rb:29:1: C: Extra empty line detected at block body end.
test/cookbooks/rabbitmq_test/files/default/tests/minitest/cook-2151-3489_test.rb:36:1: C: Extra empty line detected at block body end.
test/cookbooks/rabbitmq_test/files/default/tests/minitest/cook-1724_test.rb:28:1: C: Extra empty line detected at block body end.
test/cookbooks/rabbitmq_test/files/default/tests/minitest/cook-1684_test.rb:36:1: C: Extra empty line detected at block body end.
test/cookbooks/rabbitmq_test/files/default/tests/minitest/cluster_test.rb:18:1: C: Extra empty line detected at block body beginning.
test/cookbooks/rabbitmq_test/files/default/tests/minitest/cluster_test.rb:28:1: C: Extra empty line detected at block body end.
spec/virtualhost_management_spec.rb:13:1: C: Extra empty line detected at block body end.
spec/user_management_spec.rb:17:1: C: Extra empty line detected at block body end.
spec/policy_management_spec.rb:13:1: C: Extra empty line detected at block body end.
spec/plugin_management_spec.rb:13:1: C: Extra empty line detected at block body end.
spec/mgmt_console_spec.rb:13:1: C: Extra empty line detected at block body end.
spec/default_spec.rb:4:1: C: Extra empty line detected at block body beginning.
spec/default_spec.rb:56:1: C: Extra empty line detected at block body end.
56 files inspected, 13 offenses detected
RuboCop failed!

@jjasghar
Copy link
Contributor

@wenchma you should be able to just run rubucop -a to autocorrect the issues. I did it myself a while ago and committed it to master, i'm surprised they popped up again.

They look like all the same thing over and over, so the autocorrect option should be straight forward.

@jjasghar
Copy link
Contributor

@wenchma can you add a spec for this? This should get you started.

@wenchma
Copy link
Contributor Author

wenchma commented Dec 17, 2014

@jjasghar added a spec for this PR


describe 'different path' do
before do
node.set['rabbitmq']['config'] = '/path/to/rabbitmq'

Choose a reason for hiding this comment

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

How about below?

     let(:runner) { ChefSpec::ServerRunner.new(REDHAT_OPTS) }
     let(:node) { runner.node }
     let(:chef_run) do
       node.set['rabbitmq']['config'] = '/path/to/rabbitmq'
       runner.converge(described_recipe)
     end

Copy link
Contributor

Choose a reason for hiding this comment

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

@wenchma I like this, it's consistant with the other specs also. Thanks @stevecstian

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe the above doesn't cover the default attribute, but also looks good to me !

Choose a reason for hiding this comment

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

@wenchma Will you go with "setting attribute in let(:chef_run) block"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@stevecstian yes, will do it.

@stevecstian
Copy link

👍

jjasghar pushed a commit that referenced this pull request Dec 18, 2014
Supports setting rabbitmq config file to a different path
@jjasghar jjasghar merged commit 98c4736 into rabbitmq:master Dec 18, 2014
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