-
-
Notifications
You must be signed in to change notification settings - Fork 471
Add parameter to manage the content of log4j2.properties #1260
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
Conversation
94664b6
to
ded149d
Compare
ded149d
to
2e32949
Compare
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.
There is something really strange going on in this file...
It has a double set of on_supported_os
blocks, and I don't thing any of the tests in the second block is ran at all.
I tried to figure out where to add some acceptance testing for this, but I have no idea where to put them without creating a full shared examples file setup. |
I'll fixup commits before merge. |
it { | ||
expect(subject).to contain_file('/etc/elasticsearch/log4j2.properties'). | ||
with(ensure: 'file', content: "# Content Line 1\n# Content Line 2") | ||
} |
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.
it { | |
expect(subject).to contain_file('/etc/elasticsearch/log4j2.properties'). | |
with(ensure: 'file', content: "# Content Line 1\n# Content Line 2") | |
} | |
it do | |
expect(subject).to contain_file('/etc/elasticsearch/log4j2.properties'). | |
with(ensure: 'file', content: "# Content Line 1\n# Content Line 2") | |
end |
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.
True, multiline ruby blocks should use do..end.
But the entire module is written like this and I don't want to brake that pattern in just one test.
No rubocop autocorrect either ..
Pull Request (PR) description
Add a parameter to manage the content of the log4j config file
Very simple solution that just replaces the entire content of the file.
This PR fixes review comments in #1234 so that we can get this merged before the next release.
This Pull Request (PR) fixes the following issues
Replace Opened PR