-
Notifications
You must be signed in to change notification settings - Fork 630
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1908 from ahakanbaba/puppetManifest-verify-test-i…
…nput PuppetManifest: Add documentation on how to verify puppet files.
- Loading branch information
Showing
2 changed files
with
30 additions
and
5 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
puppetManifest parser is a test bench parser for evaluating | ||
the quality and usefulness mtable regex metaparser. | ||
|
||
Input for test cases started from puppet- under this directory are | ||
taken from puppet-3.8.7/spec/fixtures/unit/parser/lexer/*.pp. | ||
|
||
## Test Input Verification | ||
|
||
### Requirements | ||
|
||
Install puppet-agent to your platform: | ||
[Linux](https://puppet.com/docs/puppet/5.3/install_linux.html), | ||
[Windows](https://puppet.com/docs/puppet/5.3/install_windows.html) or | ||
[macOS](https://puppet.com/docs/puppet/5.3/install_osx.html) | ||
|
||
### Execute Verification | ||
|
||
From the `<repo_root>/Units/parser-puppetManifest.r` directory execute the | ||
following: | ||
|
||
``` | ||
find . -name "*.pp" | xargs -n 1 -I@ bash -c " echo @ && /opt/puppetlabs/bin/puppet apply --noop @" | ||
``` | ||
|
||
In that command we find all puppet files in the unit test directory. Then we | ||
run `puppet apply --noop` on each of them, essentially checking the input | ||
file. The return value of the above command will be non-zero if any puppet | ||
run fails. | ||
|
||
|