Details

    • Improvement
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • None
    • PDK 1.6.0
    • None
      • directory junctions are cleaned after tests
      • on a module with fixtures, running pdk test unit a second time has much lower setup time.
      • pdk test clean removes all downloaded or cloned fixtures
    • Puppet Developer Experience
    • New Feature
    • Hide
      When unit tests are run, any fixtures (symlinks, external module dependencies, etc) defined in the `fixtures.yml` will be downloaded and/or stored in the `spec/fixtures` directory and used for unit tests. Prior this fix, PDK would clean up test fixtures by default after every run of `pdk test unit`. This clean up caused longer test runs because a lot of times, re-downloading fixtures is unnecessary. Calling spec clean has been made optional via the -c or --clean-fixtures flag to `pdk test unit`.

      e.g.
      pdk test unit -c
      pdk test unit --clean-fixtures
      Show
      When unit tests are run, any fixtures (symlinks, external module dependencies, etc) defined in the `fixtures.yml` will be downloaded and/or stored in the `spec/fixtures` directory and used for unit tests. Prior this fix, PDK would clean up test fixtures by default after every run of `pdk test unit`. This clean up caused longer test runs because a lot of times, re-downloading fixtures is unnecessary. Calling spec clean has been made optional via the -c or --clean-fixtures flag to `pdk test unit`. e.g. pdk test unit -c pdk test unit --clean-fixtures
    • Needs Assessment

    Description

      cleaning all fixtures after rake spec (https://github.com/puppetlabs/puppetlabs_spec_helper/commit/3338d0315713f7e7ae2600372ac119f5f9ea0034) causes extra download times, and delays when running spec tests repeatedly.

      To solve the original problem in PDK-381, only the directory junctions on windows need cleaning.

      See e.g. https://stackoverflow.com/a/46859947/4918

      One possibility to solve is to split spec_clean into spec_clean_fast, and spec_clean_all, have spec_clean call both, but use only the _fast variant after tests. With _fast only removing symlinks.

      Expose the spec_clean_all command as pdk test clean to remove cloned and downloaded fixtures, too.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              david.schmitt David Schmitt
              Votes:
              2 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Zendesk Support