Closed cedws closed 2 years ago
Puppetfiles
.These results were generated with Rangefinder, a tool that helps predict the downstream impact of breaking changes to elements used in Puppet modules. You can run this on the command line to get a full report.
Exact matches are those that we can positively identify via namespace and the declaring modules' metadata. Non-namespaced items, such as Puppet 3.x functions, will always be reported as near matches only.
This looks good. Now it only needs some tests :smile:
Something similar to https://github.com/hercules-team/augeasproviders_grub/blob/master/spec/unit/puppet/provider/kernel_parameter/grub2_spec.rb#L73, but it should expect to never run when run_mkconfig => false
.
Apologies for the delay on this. I had a look at writing some tests but am having some toolchain issues. I've installed the dependencies with bundler
and am trying to run the tests with rspec
, but it's spitting out some errors. Any ideas?
Are you running bundle exec rake spec
?
Ah, no, I was just running rspec
from GEMPATH, thanks. I've just committed a single test, is this along the right lines? I assume you would like me to add a test for the other types as well (grub_config
, grub_user
, et al)?
Yes, please!
Sorry, not getting very far with this. Tried running bundle exec rake acceptance
on Ruby 2.7 but get this. Then I saw CI might be using 2.4.4 (though it doesn't appear to actually run the acceptance tests?) so I downgraded, now bundle install
is failing because it looks like something to do with Augeas is failing to compile. I have the headers installed on my system.
Also tried doing this all in Docker but I guess the acceptance tests require virtualisation so that won't work.
I do need to add acceptance tests for the run_mkconfig
parameter for the grub_menuentry
/grub_user
/...
types correct?
There's no acceptance tests in this module, all the tests are declared as unit tests, so you run all the tests with bundle exec rake spec
.
There actually are acceptance tests and it would be great to run them. The CI can't run them because they require virtual machines and are run through beaker
.
I suggest using PDK to set up an isolated dev environment or RVM or rbenv but not system Ruby.
Oh my bad, I didn't think we had any acceptance tests in augeasproviders modules. Sorry about that.
And I'm guessing docker containers would not be sufficient for grub tests.
Nope, docker won't work at all for GRUB. Need the real deal :-D.
I had to add them due to the complexity of GRUB itself and just being too dangerous to get wrong.
We used to run beaker on Travis with openstack or AWS nodes, but it's a paid solution.
Yeah, that's the issue. Without someone to put up a system to run the tests, there's not much that can be done besides run them by hand.
I'll be able to review this next week if it can wait that long.
I'm getting failures in beaker with the code that I'll dig into tomorrow.
@cedws Let us know if you need help with the testing. Things are 90% there!
@trevor-vaughan Thanks very much for this. I will not be able to get to it for a week or so.
I'll confess interest in this patch...
@cedws are you still interested in working on this?
I am, but have quite a lot of things going on at the moment. It's still on my to-do list. Anybody is welcome to pick this up.
Dear @cedws, thanks for the PR!
This is Vox Pupuli Tasks, your friendly Vox Pupuli GitHub Bot. I noticed that your pull request contains merge conflict. Can you please rebase?
You can find my sourcecode at voxpupuli/vox-pupuli-tasks
Closes #47. I'm afraid I don't really know Ruby tooling so I am not sure if the tests pass.