puppet-elasticsearch icon indicating copy to clipboard operation
puppet-elasticsearch copied to clipboard

Update tests to use Hiera 5

Open cocker-cc opened this issue 2 years ago • 4 comments

  • migrate Fixtures-Hiera to Hiera 5
  • sort YAML-Files alphabetically

Pull Request (PR) description

This Pull Request (PR) fixes the following issues

cocker-cc avatar Apr 14 '22 23:04 cocker-cc

Looks good. Have you used some tool to rewrite the yaml files? I think that the explicit ~ in better than emptiness, and some quoting was changed, but I can live with this. I started to work on a tool that focus on sorting YAML files but keep comments and values the way they are written, maybe you used something i am looking for?

The "Tool" I used is "25 Lines of plain Ruby": read in the YAML, sort the Keys with the Exception of lookup_options, which come to the Top, and then write out the YAML.
To my Convenience I use Vim with this Command:

for f in $(find data -type f -name '*.yaml'); do ~/bin/hiera-sort.rb "$f" | vim -c "vsp $f" -; done

Too bad, the Comments have to get migrated manually.

cocker-cc avatar Apr 15 '22 08:04 cocker-cc

@cocker-cc just released yaml-sort if you want to give it a try :stuck_out_tongue_winking_eye:

smortex avatar Apr 20 '22 22:04 smortex

@cocker-cc just released yaml-sort if you want to give it a try stuck_out_tongue_winking_eye

This looks very well implemented. Is there a Place to discuss it?

cocker-cc avatar Apr 21 '22 08:04 cocker-cc

This looks very well implemented. Is there a Place to discuss it?

@cocker-cc I opened issues on the project page ;-)

smortex avatar Apr 23 '22 18:04 smortex