diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..d77700e --- /dev/null +++ b/.editorconfig @@ -0,0 +1,14 @@ +# editorconfig.org + +# MANAGED BY MODULESYNC + +root = true + +[*] +charset = utf-8 +end_of_line = lf +indent_size = 2 +tab_width = 2 +indent_style = space +insert_final_newline = true +trim_trailing_whitespace = true diff --git a/.msync.yml b/.msync.yml index e1f48ca..1d2221f 100644 --- a/.msync.yml +++ b/.msync.yml @@ -1 +1 @@ -modulesync_config_version: '2.1.0' +modulesync_config_version: '2.2.0' diff --git a/Gemfile b/Gemfile index 45411ba..be515f5 100644 --- a/Gemfile +++ b/Gemfile @@ -12,7 +12,7 @@ end group :test do gem 'puppetlabs_spec_helper', '>= 2.11.0', :require => false - gem 'rspec-puppet-facts', :require => false + gem 'rspec-puppet-facts', '>= 1.8.0', :require => false gem 'rspec-puppet-utils', :require => false gem 'puppet-lint-leading_zero-check', :require => false gem 'puppet-lint-trailing_comma-check', :require => false @@ -28,7 +28,8 @@ group :test do gem 'coveralls', :require => false gem 'simplecov-console', :require => false gem 'rack', '~> 1.0', :require => false if RUBY_VERSION < '2.2.2' - gem 'parallel_tests', :require => false + gem 'parallel_tests', '2.24.0', :require => false if RUBY_VERSION < '2.2.0' + gem 'parallel_tests', :require => false if RUBY_VERSION >= '2.2.0' end group :development do @@ -51,7 +52,7 @@ group :system_tests do gem 'beaker-rspec', :require => false end gem 'serverspec', :require => false - gem 'beaker-hostgenerator', '>= 1.1.10', :require => false + gem 'beaker-hostgenerator', '>= 1.1.22', :require => false gem 'beaker-docker', :require => false gem 'beaker-puppet', :require => false gem 'beaker-puppet_install_helper', :require => false diff --git a/spec/acceptance/nodesets/centos-6-x64.yml b/spec/acceptance/nodesets/centos-6-x64.yml deleted file mode 100644 index 16abc8f..0000000 --- a/spec/acceptance/nodesets/centos-6-x64.yml +++ /dev/null @@ -1,15 +0,0 @@ ---- -# This file is managed via modulesync -# https://github.com/voxpupuli/modulesync -# https://github.com/voxpupuli/modulesync_config -HOSTS: - centos-6-x64: - roles: - - master - platform: el-6-x86_64 - box: centos/6 - hypervisor: vagrant -CONFIG: - type: aio -... -# vim: syntax=yaml diff --git a/spec/acceptance/nodesets/centos-66-x64-pe.yml b/spec/acceptance/nodesets/centos-66-x64-pe.yml deleted file mode 100644 index 1e7aea6..0000000 --- a/spec/acceptance/nodesets/centos-66-x64-pe.yml +++ /dev/null @@ -1,17 +0,0 @@ ---- -# This file is managed via modulesync -# https://github.com/voxpupuli/modulesync -# https://github.com/voxpupuli/modulesync_config -HOSTS: - centos-66-x64: - roles: - - master - - database - - dashboard - platform: el-6-x86_64 - box: puppetlabs/centos-6.6-64-puppet-enterprise - hypervisor: vagrant -CONFIG: - type: pe -... -# vim: syntax=yaml diff --git a/spec/acceptance/nodesets/centos-7-x64.yml b/spec/acceptance/nodesets/centos-7-x64.yml deleted file mode 100644 index e05a3ae..0000000 --- a/spec/acceptance/nodesets/centos-7-x64.yml +++ /dev/null @@ -1,15 +0,0 @@ ---- -# This file is managed via modulesync -# https://github.com/voxpupuli/modulesync -# https://github.com/voxpupuli/modulesync_config -HOSTS: - centos-7-x64: - roles: - - master - platform: el-7-x86_64 - box: centos/7 - hypervisor: vagrant -CONFIG: - type: aio -... -# vim: syntax=yaml diff --git a/spec/acceptance/nodesets/debian-82-x64.yml b/spec/acceptance/nodesets/debian-82-x64.yml deleted file mode 100644 index 9897a8f..0000000 --- a/spec/acceptance/nodesets/debian-82-x64.yml +++ /dev/null @@ -1,15 +0,0 @@ ---- -# This file is managed via modulesync -# https://github.com/voxpupuli/modulesync -# https://github.com/voxpupuli/modulesync_config -HOSTS: - debian-82-x64: - roles: - - master - platform: debian-8-amd64 - box: puppetlabs/debian-8.2-64-nocm - hypervisor: vagrant -CONFIG: - type: foss -... -# vim: syntax=yaml diff --git a/spec/acceptance/nodesets/fedora-25-x64.yml b/spec/acceptance/nodesets/fedora-25-x64.yml deleted file mode 100644 index 54dd330..0000000 --- a/spec/acceptance/nodesets/fedora-25-x64.yml +++ /dev/null @@ -1,16 +0,0 @@ ---- -# This file is managed via modulesync -# https://github.com/voxpupuli/modulesync -# https://github.com/voxpupuli/modulesync_config -# -HOSTS: - fedora-25-x64: - roles: - - master - platform: fedora-25-x86_64 - box: fedora/25-cloud-base - hypervisor: vagrant -CONFIG: - type: aio -... -# vim: syntax=yaml diff --git a/spec/acceptance/nodesets/fedora-26-x64.yml b/spec/acceptance/nodesets/fedora-26-x64.yml deleted file mode 100644 index 598822b..0000000 --- a/spec/acceptance/nodesets/fedora-26-x64.yml +++ /dev/null @@ -1,16 +0,0 @@ ---- -# This file is managed via modulesync -# https://github.com/voxpupuli/modulesync -# https://github.com/voxpupuli/modulesync_config -# -HOSTS: - fedora-26-x64: - roles: - - master - platform: fedora-26-x86_64 - box: fedora/26-cloud-base - hypervisor: vagrant -CONFIG: - type: aio -... -# vim: syntax=yaml diff --git a/spec/acceptance/nodesets/fedora-27-x64.yml b/spec/acceptance/nodesets/fedora-27-x64.yml deleted file mode 100644 index c2b61eb..0000000 --- a/spec/acceptance/nodesets/fedora-27-x64.yml +++ /dev/null @@ -1,18 +0,0 @@ ---- -# This file is managed via modulesync -# https://github.com/voxpupuli/modulesync -# https://github.com/voxpupuli/modulesync_config -# -# platform is fedora 26 because there is no puppet-agent -# for fedora 27 as of 2017-11-17 -HOSTS: - fedora-27-x64: - roles: - - master - platform: fedora-26-x86_64 - box: fedora/27-cloud-base - hypervisor: vagrant -CONFIG: - type: aio -... -# vim: syntax=yaml diff --git a/spec/acceptance/nodesets/ubuntu-server-1404-x64.yml b/spec/acceptance/nodesets/ubuntu-server-1404-x64.yml deleted file mode 100644 index 054e658..0000000 --- a/spec/acceptance/nodesets/ubuntu-server-1404-x64.yml +++ /dev/null @@ -1,15 +0,0 @@ ---- -# This file is managed via modulesync -# https://github.com/voxpupuli/modulesync -# https://github.com/voxpupuli/modulesync_config -HOSTS: - ubuntu-server-1404-x64: - roles: - - master - platform: ubuntu-14.04-amd64 - box: puppetlabs/ubuntu-14.04-64-nocm - hypervisor: vagrant -CONFIG: - type: foss -... -# vim: syntax=yaml diff --git a/spec/acceptance/nodesets/ubuntu-server-1604-x64.yml b/spec/acceptance/nodesets/ubuntu-server-1604-x64.yml deleted file mode 100644 index bc85e0e..0000000 --- a/spec/acceptance/nodesets/ubuntu-server-1604-x64.yml +++ /dev/null @@ -1,15 +0,0 @@ ---- -# This file is managed via modulesync -# https://github.com/voxpupuli/modulesync -# https://github.com/voxpupuli/modulesync_config -HOSTS: - ubuntu-server-1604-x64: - roles: - - master - platform: ubuntu-16.04-amd64 - box: puppetlabs/ubuntu-16.04-64-nocm - hypervisor: vagrant -CONFIG: - type: foss -... -# vim: syntax=yaml diff --git a/spec/classes/coverage_spec.rb b/spec/classes/coverage_spec.rb deleted file mode 100644 index de44654..0000000 --- a/spec/classes/coverage_spec.rb +++ /dev/null @@ -1,4 +0,0 @@ -require 'rspec-puppet' - -at_exit { RSpec::Puppet::Coverage.report! } -# vim: syntax=ruby diff --git a/spec/default_facts.yml b/spec/default_facts.yml index 13c4165..2f6698d 100644 --- a/spec/default_facts.yml +++ b/spec/default_facts.yml @@ -8,7 +8,6 @@ # Hint if using with rspec-puppet-facts ("on_supported_os.each"): # if a same named fact exists in facterdb it will be overridden. --- -concat_basedir: "/tmp" ipaddress: "172.16.254.254" is_pe: false macaddress: "AA:AA:AA:AA:AA:AA" diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index edd4468..f2d4688 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,10 +1,13 @@ -require 'puppetlabs_spec_helper/module_spec_helper' -require 'rspec-puppet-facts' -include RspecPuppetFacts - # This file is managed via modulesync # https://github.com/voxpupuli/modulesync # https://github.com/voxpupuli/modulesync_config +RSpec.configure do |c| + c.mock_with :rspec +end + +require 'puppetlabs_spec_helper/module_spec_helper' +require 'rspec-puppet-facts' +include RspecPuppetFacts if Dir.exist?(File.expand_path('../../lib', __FILE__)) require 'coveralls' @@ -23,14 +26,13 @@ end RSpec.configure do |c| - default_facts = { - puppetversion: Puppet.version, - facterversion: Facter.version - } + default_facts = {} default_facts.merge!(YAML.load(File.read(File.expand_path('../default_facts.yml', __FILE__)))) if File.exist?(File.expand_path('../default_facts.yml', __FILE__)) default_facts.merge!(YAML.load(File.read(File.expand_path('../default_module_facts.yml', __FILE__)))) if File.exist?(File.expand_path('../default_module_facts.yml', __FILE__)) c.default_facts = default_facts - c.mock_with :rspec -end -# vim: syntax=ruby + # Coverage generation + c.after(:suite) do + RSpec::Puppet::Coverage.report! + end +end