Beaker's puppet-specific helper library
Jenkins
Latest commit 3f35ca6 Dec 13, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
acceptance (BKR-1500) Dependency Cleanup (#55) Aug 6, 2018
bin (BKR-895) pull beaker-puppet out of beaker Apr 24, 2017
lib (GEM) update beaker-puppet version to 1.13.0 Dec 13, 2018
setup
spec (MAINT) Use puppet.com URLs instead of puppetlabs.com (#78) Dec 10, 2018
tasks (BKR-1523) Add only-fails capability to beaker Dec 11, 2018
.gitignore (BKR-895) fix pkg path exclusion May 19, 2017
.simplecov (MAINT) fix coverage env-var name Jun 9, 2017
Gemfile (BKR-1500) Dependency Cleanup (#55) Aug 6, 2018
HISTORY.md (HISTORY) update beaker-puppet history for gem release 0.2.0 Jun 28, 2017
LICENSE (BKR-895) pull beaker-puppet out of beaker Apr 24, 2017
README.md (BKR-1500) Dependency Cleanup (#55) Aug 6, 2018
Rakefile (MAINT) fix coverage env-var name Jun 9, 2017
beaker-puppet.gemspec (PUP-9136) Ensure state is preserved between runs Oct 25, 2018

README.md

beaker-puppet: The Puppet-Specific Beaker Library

The purpose of this library is to hold all puppet-specific info & DSL methods. This includes all helper & installer methods.

It might not be up to that state yet, but that's the goal for this library. If you see anything puppet-specific that you'd like to pull into this library out of beaker, please do, we would love any help that you'd like to provide.

How Do I Use This?

With Beaker 3.x

This library is included as a dependency of Beaker 3.x versions and is automatically included, so there's nothing to do.

With Beaker 4.x

As of Version 1.0 of beaker-puppet, the minimum supported version of beaker is Version 4.0. If you use ENV['BEAKER_VERSION'], you will have to ensure that this is compatible, and that if you are using a local Git repository it is up to date.

As of beaker 4.0, all hypervisor and DSL extension libraries have been removed and are no longer dependencies. In order to use a specific hypervisor or DSL extension library in your project, you will need to include them alongside Beaker in your Gemfile or project.gemspec. E.g.

# Gemfile
gem 'beaker', '~>4.0'
gem 'beaker-puppet', '~>1.0'
# project.gemspec
s.add_runtime_dependency 'beaker', '~>4.0'
s.add_runtime_dependency 'beaker-puppet', '~>1.0'

For DSL Extension Libraries, you must also ensure that you require the library in your test files. You can do this manually in individual test files or in a test helper (if you have one). You can use Bundler.require() to require the library automatically.

Right Now? (beaker 3.x)

At this point, beaker-puppet is included in beaker, so you don't have to do anything to get the methods in this library.

You can use these methods in a test by referencing them by name without qualifications, as they're included in the beaker DSL by default.

In beaker's Next Major Version? (beaker 4.x)

In beaker's next major version, the requirement for beaker-puppet will be pulled from that repo. When that happens, then the usage pattern will change. In order to use this then, you'll need to include beaker-puppet as a dependency right next to beaker itself.

Once you've done that & installed the gems, in your test, you'll have to

require 'beaker-puppet'

Doing this will include (automatically) the beaker-puppet DSL methods in the beaker DSL. Then you can call beaker-puppet methods, exactly as you did before.

How Do I Test This?

Unit / Spec Testing

You can run the spec testing using our rake task test:spec:run. You can also run rspec directly. If you'd like to see a coverage report, then you can run the test:spec:coverage rake task.

Acceptance Testing

Acceptance testing can be run using the acceptance rake test namespace. For instance, to test using our package installation, you can run the acceptance:pkg task.

Note in the above rake tasks that there are some environment variables that you can use to customize your run. For specifying your System Under Test (SUT) environment, you can use BEAKER_HOSTS, passing a file path to a beaker hosts file, or you can provide a beaker-hostgenerator value to the TEST_TARGET environment variable. You can also specify the tests that get executed with the TESTS environment variable.

Contributing

Please refer to puppetlabs/beaker's contributing guide.

Releasing

To release new versions of beaker-puppet, please use the jenkins job. This job lives on internal infrastructure.

To run the job, click on Build with Parameters in the menu on the left. Make sure you check the box next to PUBLIC and enter the appropriate version. The version should adhere to semantic version standards. When in doubt, consult the maintainers of Beaker for guidance.