Closed glennsarti closed 4 years ago
See the failures at the bottom of #236
Okay, so it's a bug in Facter 4.0.16. 4.0.15 is fine. I am 99% sure it's due to https://github.com/puppetlabs/facter-ng/blame/master/lib/facter.rb#L189
@glennsarti do you have a short repro? I can follow up with the team
bundle exec rspec --default .\spec\languageserver-sidecar\ -f d spec/languageserver-sidecar/integration/puppet-languageserver-sidecar/facter_helper_spec.rb:40
Apologies for Windows paths.
Will fail to find the custom fact in the cache dir fixture.
If you lock Facter to 4.0.15 e.g. in Gemfile add gem 'facter', '=4.0.15'
, redo the bundle install and run the test again it passes.
bundle exec puppet facts --vardir C:/Source/puppet-editor-services/spec/languageserver-sidecar/fixtures/real_agent/cache --confdir C:/Source/puppet-editor-services/spec/languageserver-sidecar/fixtures/real_agent/confdir
Still works so it's something I'm not initialising correctly, but that reset
call I linked earlier seems a really bad idea.
Interestingly... using Editor Services Facter.reset gets called twice, but puppet facts
calls it three times!!
I guess it must REALLY be reset by then...
The failing tests failed to find a custom fact in the puppet cache dir, or in a modulepath
@glennsarti with the fix from https://github.com/puppetlabs/facter-ng/tree/FACT-2562-2 the tests pass. To run the test I have used
export PUPPET_GEM_VERSION="~> 6.0"
bundle exec rake test_languageserver test_languageserver_sidecar test_debugserver
I had a look at the branch. It does concern me there weren't tests for this though.
The Travis and Appveyor tests are failing now that Facter 4 is available.