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

Add missing new lines when generating files #190

Closed
wants to merge 5 commits into from

Conversation

Josh5K
Copy link

@Josh5K Josh5K commented Oct 2, 2020

Description

Adds the required newlines when generating log4j.properties and /etc/sysconfig/kafka

Issues Resolved

#189

Check List

  • All tests pass. See TESTING.md for details.
  • New functionality includes testing.
  • New functionality has been documented in the README if applicable.

Sorry, something went wrong.

@ramereth
Copy link
Contributor

ramereth commented Oct 2, 2020

@Josh5K think you can please add a test which verifies this is doing what you expect?

Comment on lines +60 to +62
it 'has > 1 line' do
expect(File.open('/opt/kafka/config/log4j.properties', 'r').readlines.size).to be > 1
end
Copy link
Contributor

Choose a reason for hiding this comment

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

I recommend you use the file InSpec Resource for this test instead of using raw ruby and actually check some of the content specifically.

@xorima xorima added the Release: Patch Release to Chef Supermarket as a version patch when merged label Nov 23, 2020
@xorima
Copy link
Contributor

xorima commented Nov 27, 2020

Hey @Josh5K

Can you change the tests to use the native inspec file resource then we can get this merged,

Thanks!

@xorima xorima added the Waiting on Contributor Awaiting on the person who raised this to update label Nov 27, 2020
@Josh5K
Copy link
Author

Josh5K commented Dec 8, 2020

Hi, Sorry for the 👻 ing. I'll get the tests fixed next time I have some free time.

@hrak
Copy link

hrak commented Apr 30, 2021

Can this PR be unblocked / merged please? This issue is actually preventing Kafka from starting up due to the lack of newlines in /etc/default/kafka (or /etc/sysconfig/kafka on Redhat/Fedora based distros)

@damacus
Copy link
Member

damacus commented Apr 30, 2021

@hrak do you fancy taking over this PR and fixing up the tests?

@hrak
Copy link

hrak commented May 3, 2021

@hrak do you fancy taking over this PR and fixing up the tests?

no problem, i also have a cleaner solution that matches the one used in libraries/log4j.rb. Will file a new PR.

@hrak
Copy link

hrak commented May 6, 2021

Filed a new PR in #193

@damacus damacus closed this May 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Release: Patch Release to Chef Supermarket as a version patch when merged Waiting on Contributor Awaiting on the person who raised this to update
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants