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 regex and test error #554

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Conversation

dadez73
Copy link

@dadez73 dadez73 commented Oct 11, 2024

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

@@ -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]
Copy link
Member

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?

Copy link
Author

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.

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

@@ -65,16 +59,16 @@

it 'configures votequorum' do
is_expected.to contain_file('/etc/corosync/corosync.conf').with_content(
%r{nodelist}
%r{nodelist\s*\{}
Copy link
Member

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?

Copy link
Author

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.

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