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

Projects
None yet
3 participants
@wenchma
Copy link
Contributor

commented Dec 15, 2014

issue #157
Fixes issue #157

@jjasghar jjasghar added the unknown label Dec 15, 2014

@wenchma wenchma force-pushed the wenchma:issues#157 branch from 2579cb2 to 7b8717a Dec 15, 2014

@wenchma

This comment has been minimized.

Copy link
Contributor Author

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

This comment has been minimized.

Copy link
Collaborator

commented Dec 15, 2014

@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

This comment has been minimized.

Copy link
Collaborator

commented Dec 16, 2014

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

@wenchma wenchma force-pushed the wenchma:issues#157 branch from 7b8717a to 0f5b91a Dec 17, 2014

@wenchma

This comment has been minimized.

Copy link
Contributor Author

commented Dec 17, 2014

@jjasghar added a spec for this PR

@wenchma wenchma force-pushed the wenchma:issues#157 branch from 0f5b91a to fa88c22 Dec 17, 2014


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

This comment has been minimized.

Copy link
@stevecstian

stevecstian Dec 17, 2014

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

This comment has been minimized.

Copy link
@jjasghar

jjasghar Dec 17, 2014

Collaborator

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

This comment has been minimized.

Copy link
@wenchma

wenchma Dec 18, 2014

Author Contributor

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

This comment has been minimized.

Copy link
@stevecstian

stevecstian Dec 18, 2014

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

This comment has been minimized.

Copy link
@wenchma

wenchma Dec 18, 2014

Author Contributor

@stevecstian yes, will do it.

@jjasghar jjasghar added TODO and removed needs tests unknown labels Dec 17, 2014

@wenchma wenchma force-pushed the wenchma:issues#157 branch from fa88c22 to a626b37 Dec 18, 2014

@stevecstian

This comment has been minimized.

Copy link

commented Dec 18, 2014

👍

jjasghar pushed a commit that referenced this pull request Dec 18, 2014

JJ Asghar
Merge pull request #184 from wenchma/issues#157
Supports setting rabbitmq config file to a different path

@jjasghar jjasghar merged commit 98c4736 into rabbitmq:master Dec 18, 2014

1 check passed

continuous-integration/travis-ci The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.