-
-
Notifications
You must be signed in to change notification settings - Fork 161
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 regex and test error #554
base: master
Are you sure you want to change the base?
Conversation
lib/puppet/provider/cs_clone/pcs.rb
Outdated
@@ -28,7 +28,7 @@ def change_clone_id(type, primitive, id, cib) | |||
return unless doc.root.attributes['id'] != id | |||
|
|||
doc.root.attributes['id'] = id | |||
cmd = [command(:cibadmin), '--replace', '--xpath', xpath, '--xml-text', doc.to_s.chop] | |||
cmd = [command(:cibadmin), '--replace', '--xpath', xpath, '--xml-text', doc.to_s] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
which errors did that cause? Maybe this was meant to be chomp. not chop?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i agree chomp is the best solution! i it was cutting in half a new line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh you did find that also. wasn't aware of it
spec/classes/corosync_spec.rb
Outdated
@@ -65,16 +59,16 @@ | |||
|
|||
it 'configures votequorum' do | |||
is_expected.to contain_file('/etc/corosync/corosync.conf').with_content( | |||
%r{nodelist} | |||
%r{nodelist\s*\{} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wondering if those additional regular expressions provide any value? Do you think the original tests weren't sufficient enough, or did they cause problems?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not really add value, just checking whole line.
Removed typing error "$"char
Removed typing error "$"char chop -> chomp
Pull Request (PR) description
This should fix the automatic test regex. and the cutted char in the config
This Pull Request (PR) fixes the following issues
#536