Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(DOC) Update docs to correctly show how to specify the Puppet version #1426

Merged
merged 1 commit into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/pdk_reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ pdk test unit [--tests=<TEST_LIST>] [--format=<FORMAT>[:<TARGET_FILE>]] [--puppe
For example:

```bash
pdk test unit --tests=test1,test2,test3 --puppet-version=5
pdk test unit --tests=test1,test2,test3 --puppet-version=7
```

To learn more, see the [validating and testing modules](pdk_testing.md) topic.
Expand All @@ -418,7 +418,7 @@ topic.
|`--format=<FORMAT>[:<TARGET_FILE>]`|Specifies the format of the output. Optionally, you can specify a target file for the given output format, such as `--format=junit:report.xml` . You can specify multiple `--format` options if each has a distinct output target. To output to standard output or standard error, specify `stdout` or `stderr` as the target value.|<ul><li>`junit` (JUnit XML)</li><li>`text` (plain text)</li></ul>|If not specified, does not output to a file, but displays errors in the terminal.|
|`--list`|Displays a list of unit tests and their descriptions. Using this option lists the tests without running them.|No value. Optional `--verbose` or `-v` flag displays more information.|No default.|
|`--puppet-dev`|When specified, PDK runs unit tests against the current Puppet source from GitHub. To use this option, you must have network access to https://github.com. You cannot specify `--puppet-dev` together with the `--puppet-version=` options.|None.|If not specified, PDK runs unit tests against default values or those specified by `--puppet-version`.|
|`--puppet-version`|Specifies the Puppet gem version to run unit tests against.|A string indicating the Puppet version to test against, such as "5.4.2" or "5.5".|If not specified, tests against the most recent compatible Puppet version included in the PDK package.|
|`--puppet-version`|Specifies the Puppet gem version to run unit tests against.|A string indicating the major Puppet version to test against, such as "7" or "8".|If not specified, tests against the most recent compatible Puppet version included in the PDK package.|
|`--tests=<TEST_LIST>`|A comma-separated list of tests to run. Use this during development to pinpoint a single failing test.|See the `--list` output for available values.|No default.|
|`--verbose`|When specified, PDK outputs a single line description for each test as the test is executed. This option uses the RSpec `documentation` format. For more information, see [RSpec Core Formatters](https://rubydoc.info/gems/rspec-core/RSpec/Core/Formatters).|None.|None.|

Expand Down Expand Up @@ -479,6 +479,6 @@ topic.
|`--list`|Displays a list of available validations and their descriptions. Using this option lists the tests without running them.|None.|No default.|
|`--parallel`|Runs all validations simultaneously, using multiple threads.|None.|If not specified, validations are run in succession on a single thread.|
|`--puppet-dev`|When specified, PDK validates against the current Puppet source from GitHub. To use this option, you must have network access to https://github.com. You cannot specify `--puppet-dev` together with the `--puppet-version=` options.|None.|If not specified, PDK validates against default values or those specified by `--puppet-version`.|
|`--puppet-version`|Specifies the Puppet gem version to run validations against.|A string indicating the Puppet version to validate against, such as "5.4.2" or "5.5".|If not specified, validates against the most recent compatible Puppet version included in the PDK package.|
|`--puppet-version`|Specifies the Puppet gem version to run validations against.|A string indicating the major Puppet version to validate against, such as "7" or "8".|If not specified, validates against the most recent compatible Puppet version included in the PDK package.|
|`<TARGETS>`|A list of directories or individual files to validate. Validations which are not applicable to individual files will be skipped for those files.|A space-separated list of directories or files.|Validates all available directories and files.|
|`<VALIDATIONS>`|A comma-separated list of validations to run or `all` for all validations. In PowerShell, this list must be enclosed in single quotes, such as `pdk validate 'puppet,metadata'`|See the `--list`output for a list of available validations.|`all`|
20 changes: 10 additions & 10 deletions docs/pdk_testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,20 +99,20 @@ send your validation output to a file in either JUnit or text format.

2. Run all validations by running `pdk validate` .

To change validation behavior, add option flags to the command. For example,
to run all validations simultaneously on multiple threads, run:
You can customize unit test execution by using command-line options with PDK.
Here are some common scenarios:

```no-highlight
pdk validate --parallel
```

To validate against a specific version of Puppet or PE, add the
To validate against a specific major version of Puppet, add the
`--puppet-version` option flag.

For example. To validate against Puppet 5.5.12, run:
For example. To validate against Puppet 7, run:

```no-highlight
pdk validate --puppet-version 5.5.12
pdk validate --puppet-version 7
```

For a complete list of command options and usage information, see the PDK
Expand Down Expand Up @@ -196,20 +196,20 @@ correctly performs the functions you expect it to.

2. Run `pdk test unit`

To change unit test behavior, add option flags to the command. For example,
to run only certain unit tests, run:
You can customize unit test execution by using command-line options with PDK.
Here are some common scenarios:

```no-highlight
pdk test unit --tests=<TEST1>,<TEST2>
```

To unit test against a specific version of Puppet, add a version
To unit test against a specific major version of Puppet, add a version
option flag.

For example. To test against Puppet 5.5.12, run:
For example. To test against Puppet 7, run:

```no-highlight
pdk test unit --puppet-version 5.5.12
pdk test unit --puppet-version 7
```


Expand Down
Loading