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

Flaky tetst due to wrong default service proivider on Debian 9 #770

Open
TheMeier opened this issue Oct 28, 2019 · 5 comments
Open

Flaky tetst due to wrong default service proivider on Debian 9 #770

TheMeier opened this issue Oct 28, 2019 · 5 comments

Comments

@TheMeier
Copy link

TheMeier commented Oct 28, 2019

There were changes made in puppetlabs/puppet who the default service provider is detected if it is systemd

puppetlabs/puppet@a7b9d0e

Ever since those changes were made our tests are flaky because sometimes the default service provider will not be detected and set to runit
Our tests run on premise in gitlab-ci using the docker executor. This also means pid 1 is NOT systemd, as this code https://github.com/puppetlabs/puppet/blob/master/lib/puppet/provider/service/systemd.rb#L14 assumes.

This is related to #720

@rodjek
Copy link
Owner

rodjek commented Oct 30, 2019

I would suggest adding the monkey patch from #720 to your spec_helper.rb.

I'm really not keen on adjusting the confines of that provider in rspec-puppet because it then does not accurately represent the real behaviour of Puppet, but instead the behaviour of Puppet with the Debian package maintainers patches applied.

@TheMeier
Copy link
Author

TheMeier commented Oct 30, 2019

If I understand it correctly spec_helper.rb and spec_helper_acceptance.rb will becom part of PDK itself some day (not the templates) then monkey patching these would not be the easiest thing.
Currently I am testing a patch for puppet to mitigate this issue puppetlabs/puppet#7794

@seanmil
Copy link
Contributor

seanmil commented Oct 30, 2019

If I understand it correctly spec_helper.rb and spec_helper_acceptance.rb will becom part of PDK itself some day (not the templates) then monkey patching these would not be the easiest thing.

@TheMeier The standard PDK templates include an ability to add custom additions to spec_helper.rb which you could likely use. See https://github.com/puppetlabs/pdk-templates/blob/master/moduleroot/spec/spec_helper.rb.erb#L70-L73 for the code and spec_overrides in the spec_helper.rb template configuration documentation section here: https://github.com/puppetlabs/pdk-templates#specspec_helperrb

@TheMeier
Copy link
Author

@seanmil I am well aware of that i was just pointing out that this maybe might go away in the future

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

No branches or pull requests

3 participants