-
-
Notifications
You must be signed in to change notification settings - Fork 143
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
systemd::timer: fix before's argument to use the proper syntax #315
Conversation
Signed-off-by: Simon Deziel <[email protected]>
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, good catch. I wonder if Unit_File
is every really valid. If not, perhaps it's a lint rule or even syntax rule that could catch this.
What I'm also surprised about is that the unit tests didn't catch this. We have it covered here:
puppet-systemd/spec/defines/timer_spec.rb
Lines 30 to 32 in a8712e4
expect(subject).to contain_systemd__unit_file('foobar.service').with( | |
content: "[Service]\nExecStart=/bin/touch /tmp/foobar" | |
).that_comes_before('Systemd::Unit_file[foobar.timer]') |
I'm not up to date on how Puppet (and rspec) evaluates manifests theses days. I vaguely remember that at some point it stopped doing a random order to switch to the more natural top to bottom order. But maybe I am misremembering. |
Yikes. We obviously have an acceptance test coverage problem. |
The fixed will be included in the #317 release. |
I recall that Puppet was case insensitive about some of these matters (pretty sure that was true for type aliases), but then not all tooling understands that. So it may be valid, but not the preferred style. Personally I think there should just be a single valid style and enforce that |
The ordering parameter was removed in Puppet 6.0 and is now always top to bottom unless there's explicit ordering. That said, I'm fairly certain the implementation doesn't create actual relationships in the resource graph, so rspec puppet wouldn't see these. I'm guessing it's just a case insensitivity thing in Puppet. |
I was reading the code and vim wouldn't highlight that line properly...