| When running integration spec tests via `bundle exec rake spec_integration`, there is on occasion a transient failure with the method `write_to_file` that is located here. An example of a failure is in Josh's recent PR where we have it failing with Jruby:
Failures: |
|
1) Facter .value when structured facts are disabled with external fact when has the same name as a structured core fact overrides part of the core fact |
Failure/Error: File.open(file, 'w') { |f| f.print to_write } |
|
Errno::ENOENT: |
No such file or directory - /tmp/external_facts20230506-1937-c1swbx/TPQFNUSF_os_fact.yaml |
# ./spec_integration/facter_spec.rb:13:in `write_to_file' |
# ./spec_integration/facter_spec.rb:217:in `block in <main>' |
|
Finished in 1 minute 41.93 seconds (files took 17.65 seconds to load) |
132 examples, 1 failure
|
I've reproduced this locally off of the main branch of Facter using jruby 9.3.7.0, and it failed with the same helper method but on a different block:
Failures: |
|
1) Facter .to_user_output with external facts with array as value does not use non numeric string as index |
Failure/Error: File.open(file, 'w') { |f| f.print to_write } |
|
Errno::ENOENT: |
No such file or directory - /var/folders/51/zzwtq8mx28d2d4xpg26xk3n00000gp/T/external_facts20230523-22303-1m7n44l/JOHNFAPU_os_fact.yaml |
# ./spec_integration/facter_spec.rb:13:in `write_to_file' |
# ./spec_integration/facter_spec.rb:432:in `block in <main>'
|
This is a pretty sporadic transient failure, I have to re-run the spec integration tests about 5+ times to get it to fail once. |