HomePhorge

(#7656) Port PMT integration test into Puppet core
bf9e847d2bc1Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

(#7656) Port PMT integration test into Puppet core

Before this patch, the Puppet Module Tool (PMT) integration tests lived
in the PMT codebase -- in a separate project.

This patch ports the PMT integration tests into core Puppet with the
following major changes and refactorings.

All temp file and directory management logic is being removed in favor
of using the existing helper methods in PuppetSpec::Files. This change
has the added benefit of not leaving around temp files or directories
after tests are run.

The following helper methods are being merged into module_tool_spec.rb

  • stub_repository_read
  • stub_installer_read
  • stub_cache_read
  • testdir
  • mktestdircd
  • rmtestdir

This change is being made because each of the above methods are only
used by module_tool_spec.rb. This also removes the need to add another
set of "global" helper functions to the code base. As a result of this
change the spec/support/output_support.rb,
spec/support/stub_http_support.rb, and testdir_support.rb modules
are not being ported over.

Tests have been updated to test the new return values of the generate,
build, search, install, clean, and changes applications. This change is
being made to reflect the new behavior of those actions, which now
return either status hashes, Pathname objects, or an array of file
paths.

The following tests are being removed:

  • repository

The single test for the repository sub-command is being removed
because it is no longer valid. The repository sub-command is not being
ported over.

All tests are being updated to use the full name of the application
under test, for example:

Puppet::Module::Tool::Applications::Generator.run

This change is being made to reflect the fact that the
lib/puppet/module/tool/cli.rb module is not being ported over, so the
abstraction provided by Puppet::Module::Tool::CLI.new is no longer
available.

This patch also renames the integration test from cli_spec.rb to
module_tool_spec.rb in order to match the module name under test.

Details

Provenance
Kelsey Hightower <kelsey@puppetlabs.com>Authored on
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPUbce8e4329874: (#7656) Port PMT unit test into Puppet core
Branches
Unknown
Tags
Unknown

Event Timeline

Kelsey Hightower <kelsey@puppetlabs.com> committed rPUbf9e847d2bc1: (#7656) Port PMT integration test into Puppet core (authored by Kelsey Hightower <kelsey@puppetlabs.com>).Dec 5 2011, 4:48 PM