-
-
Notifications
You must be signed in to change notification settings - Fork 167
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
107 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
--- | ||
.travis.yml: | ||
docker_sets: | ||
- set: ubuntu1404-64 | ||
- set: centos7-64 | ||
- set: centos6-64 | ||
secure: "WcBaQ0iem0kLmgOHvOEYOsgAk6eFZcSJ/6AisPhS4Ty9gxaEcytE8if2d9ThOItRRua5XGAPk7WbYmTa/cy/EsH0LYwSDdP2eagI95CnmryGya5TShKwUMv1ETUOBFucRYxtcOo7URnTMe2d6IpxEazuZ87cwGLUV5taBRkEvkw=" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,22 @@ | ||
require 'json' | ||
require 'beaker-rspec/spec_helper' | ||
require 'beaker-rspec/helpers/serverspec' | ||
require 'beaker-rspec' | ||
require 'beaker-puppet' | ||
require 'beaker/puppet_install_helper' | ||
require 'beaker/module_install_helper' | ||
|
||
unless ENV['BEAKER_provision'] == 'no' | ||
hosts.each do |host| | ||
# Install Puppet | ||
if host.is_pe? | ||
install_pe | ||
else | ||
install_puppet | ||
end | ||
end | ||
end | ||
run_puppet_install_helper unless ENV['BEAKER_provision'] == 'no' | ||
install_module | ||
install_module_dependencies | ||
|
||
RSpec.configure do |c| | ||
# Project root | ||
proj_root = File.expand_path(File.join(File.dirname(__FILE__), '..')) | ||
|
||
# Readable test descriptions | ||
c.formatter = :documentation | ||
|
||
# Configure all nodes in nodeset | ||
c.before :suite do | ||
# Install module and dependencies | ||
puppet_module_install(source: proj_root, module_name: 'r10k') | ||
hosts.each do |host| | ||
JSON.parse(File.read('metadata.json'))['dependencies'].each do |dependency| | ||
on host, puppet('module', 'install', dependency['name'].to_s), acceptable_exit_codes: [0, 1] | ||
end | ||
hosts.each do |_host| | ||
ensure_puppet_user_exists = %( | ||
user { 'puppet': | ||
ensure => present, | ||
} | ||
) | ||
apply_manifest(ensure_puppet_user_exists, catch_failures: true) | ||
end | ||
end | ||
end |