Test modules before upgrading

Before upgrading, make sure your modules work with the newest PE version by using the Puppet Development Kit (PDK) to update and test your modules.

If you're already using PDK, your modules should pass validation and unit tests with your currently installed version of PDK.

Updating PDK with each new release ensures module compatibility with new versions of PE.

  1. Download and install PDK. If you already have PDK installed, this updates PDK to its latest version. For detailed instructions and download links, go to Installing PDK in the PDK documentation.
  2. If you have not previously used PDK with your modules, convert them to a PDK-compatible format. This makes changes to your module to allow validation and unit testing with PDK. For important information, go to Converting modules in the PDK documentation.
    For example, from within the module directory, run: pdk convert
  3. If your modules are already compatible with PDK, update them to the latest module template. If you converted modules in the previous step, you do not need to update the template. To learn more about updating, go to Updating modules with changes to the template in the PDK documentation.
    For example, from within the module directory, run: pdk update
  4. Validate and run unit tests for each module, specifying the version of PE you are upgrading to. When specifying a PE version, you must included at least the first two parts of the release number, such as 2023.0. For information about module validations and testing, go to Validating and testing modules in the PDK documentation.
    For example, from within the module directory, run:
    pdk validate
    pdk test unit
    The pdk test unit command verifies that testing dependencies and directories are present and then runs the unit tests that you write. It does not create unit tests for your module.
  5. If your module fails validation or unit tests, make any necessary changes to your code and retest.
Results
After you've verified that your modules work with the new PE version, you can continue with your upgrade.