saltstack-formulas / openssh-formula

http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html
Other
90 stars 297 forks source link

Ci/validate map.jinja #187

Closed baby-gnu closed 4 years ago

baby-gnu commented 4 years ago

PR progress checklist (to be filled in by reviewers)


What type of PR is this?

Primary type

Secondary type

Does this PR introduce a BREAKING CHANGE?

No.

Related issues and/or pull requests

Describe the changes you're proposing

This PR permits to validate the values gathered by map.jinja by:

Pillar / config required to test the proposed changes

N/A

Debug log showing how the proposed changes work

  ✔  `map.jinja` YAML dump: should contain the lines
     ✔  File /tmp/salt_mapdata_dump.yaml is expected to exist
     ✔  File /tmp/salt_mapdata_dump.yaml content is expected to include "# yamllint disable rule:indentation rule:line-length\n# Debian-10\n---\nopenssh:\n  absent_dsa_keys:...td: 'no'\n  Subsystem: sftp /usr/lib/openssh/sftp-server\n  UsePAM: 'yes'\n  X11Forwarding: 'yes'\n"

Documentation checklist

Testing checklist

Additional context

pull-assistant[bot] commented 4 years ago
Score: 1.00

Best reviewed: commit by commit


Optimal code review plan

     test(inspec): share library to access some minion informations      test(inspec): verify `map.jinja` dump      ci(kitchen): execute `_mapdata` state      feat(map): generate a YAML file to validate `map.jinja`

Powered by Pull Assistant. Last update a8d61f4 ... e4ab335. Read the comment docs.

myii commented 4 years ago

@baby-gnu Merged! Really appreciate all of the iterations you went through to get this ready. One of my favourite PRs for a long time!

As a little afterthought (perhaps consider for the next PR after discussing with the others): should we use _mapdata everywhere or is it OK to stick with mapdata in some places? For example, the sub-directory name.

saltstack-formulas-travis commented 4 years ago

:tada: This PR is included in version 1.3.0 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket:

baby-gnu commented 4 years ago

As a little afterthought (perhaps consider for the next PR after discussing with the others): should we use _mapdata everywhere or is it OK to stick with mapdata in some places? For example, the sub-directory name.

That's an interesting question and I didn't even thought about it when creating the mapdata directory in InSpec profile directory.

I consider the underscore in _mapdata as a notice to users this is something you shouldn't bother, like in Python policy. So outside of user purpose directory the underscore as little meaning to me.

But we could also make it coherent everywhere and it could be renamed quickly to _mapdata. There is no much to do for it ;-)