Skip to content

Commit

Permalink
Merge pull request #1908 from ahakanbaba/puppetManifest-verify-test-i…
Browse files Browse the repository at this point in the history
…nput

PuppetManifest: Add documentation on how to verify puppet files.
  • Loading branch information
masatake committed Oct 7, 2018
2 parents a39e1de + b85a29c commit 208e2c0
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 5 deletions.
5 changes: 0 additions & 5 deletions Units/parser-puppetManifest.r/README

This file was deleted.

30 changes: 30 additions & 0 deletions Units/parser-puppetManifest.r/README.md
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.


0 comments on commit 208e2c0

Please sign in to comment.