]> gitweb.fluxo.info Git - puppet-ferm.git/commitdiff
modulesync 2.3.1
authorTim Meusel <tim@bastelfreak.de>
Tue, 4 Dec 2018 21:43:57 +0000 (22:43 +0100)
committerTim Meusel <tim@bastelfreak.de>
Tue, 4 Dec 2018 21:43:57 +0000 (22:43 +0100)
21 files changed:
.editorconfig [new file with mode: 0644]
.github/CONTRIBUTING.md
.msync.yml
.pmtignore
Dockerfile [new file with mode: 0644]
Gemfile
spec/acceptance/nodesets/centos-511-x64.yml [deleted file]
spec/acceptance/nodesets/centos-6-x64.yml [deleted file]
spec/acceptance/nodesets/centos-66-x64-pe.yml [deleted file]
spec/acceptance/nodesets/centos-7-x64.yml [deleted file]
spec/acceptance/nodesets/debian-78-x64.yml [deleted file]
spec/acceptance/nodesets/debian-82-x64.yml [deleted file]
spec/acceptance/nodesets/fedora-25-x64.yml [deleted file]
spec/acceptance/nodesets/fedora-26-x64.yml [deleted file]
spec/acceptance/nodesets/fedora-27-x64.yml [deleted file]
spec/acceptance/nodesets/ubuntu-server-1204-x64.yml [deleted file]
spec/acceptance/nodesets/ubuntu-server-1404-x64.yml [deleted file]
spec/acceptance/nodesets/ubuntu-server-1604-x64.yml [deleted file]
spec/classes/coverage_spec.rb [deleted file]
spec/default_facts.yml
spec/spec_helper.rb

diff --git a/.editorconfig b/.editorconfig
new file mode 100644 (file)
index 0000000..d77700e
--- /dev/null
@@ -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
index 832578e12ee42126fd8bbce7f0a9d0c0ae96d462..4a519698759d026c95da04c28eb1e1bc03340d7e 100644 (file)
@@ -109,6 +109,21 @@ To run a specific spec test set the `SPEC` variable:
 bundle exec rake spec SPEC=spec/foo_spec.rb
 ```
 
+### Unit tests in docker
+
+Some people don't want to run the dependencies locally or don't want to install
+ruby. We ship a Dockerfile that enables you to run all unit tests and linting.
+You only need to run:
+
+```sh
+docker build .
+```
+
+Please ensure that a docker daemon is running and that your user has the
+permission to talk to it. You can specify a remote docker host by setting the
+`DOCKER_HOST` environment variable. it will copy the content of the module into
+the docker image. So it will not work if a Gemfile.lock exists.
+
 ## Integration tests
 
 The unit tests just check the code runs, not that it does exactly what
index e1f48cab58f9f6602459e66db61b0d45e64f65fe..648cf244b659112e6ebe80202ef3180003ce1aeb 100644 (file)
@@ -1 +1 @@
-modulesync_config_version: '2.1.0'
+modulesync_config_version: '2.3.1'
index fb5895753dfefe38ebb13b7147c0d1a3fc376c87..4e6d54b82a27b313de1e06c593c04761e188d0ae 100644 (file)
@@ -18,3 +18,4 @@ Puppetfile.lock
 *.iml
 .*.sw?
 .yardoc/
+Dockerfile
diff --git a/Dockerfile b/Dockerfile
new file mode 100644 (file)
index 0000000..27a33cf
--- /dev/null
@@ -0,0 +1,21 @@
+FROM ruby:2.5.1
+
+WORKDIR /opt/puppet
+
+# https://github.com/puppetlabs/puppet/blob/06ad255754a38f22fb3a22c7c4f1e2ce453d01cb/lib/puppet/provider/service/runit.rb#L39
+RUN mkdir -p /etc/sv
+
+ARG PUPPET_VERSION="~> 6.0"
+ARG PARALLEL_TEST_PROCESSORS=4
+
+# Cache gems
+COPY Gemfile .
+RUN bundle install --without system_tests development release --path=${BUNDLE_PATH:-vendor/bundle}
+
+COPY . .
+
+RUN bundle install
+RUN bundle exec release_checks
+
+# Container should not saved
+RUN exit 1
diff --git a/Gemfile b/Gemfile
index dd1b03a6d6046c0dc7e83b157b88c96419155e63..9648d7de0146cfa4f9d6dc00a86ce72ab0410de1 100644 (file)
--- 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
@@ -43,7 +44,7 @@ group :system_tests do
   if beaker_version = ENV['BEAKER_VERSION']
     gem 'beaker', *location_for(beaker_version)
   else
-    gem 'beaker', '>= 3.9.0', :require => false
+    gem 'beaker', '>= 4.2.0', :require => false
   end
   if beaker_rspec_version = ENV['BEAKER_RSPEC_VERSION']
     gem 'beaker-rspec', *location_for(beaker_rspec_version)
@@ -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-511-x64.yml b/spec/acceptance/nodesets/centos-511-x64.yml
deleted file mode 100644 (file)
index 089d646..0000000
+++ /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-511-x64:
-    roles:
-      - master
-    platform: el-5-x86_64
-    box: puppetlabs/centos-5.11-64-nocm
-    hypervisor: vagrant
-CONFIG:
-  type: foss
-...
-# vim: syntax=yaml
diff --git a/spec/acceptance/nodesets/centos-6-x64.yml b/spec/acceptance/nodesets/centos-6-x64.yml
deleted file mode 100644 (file)
index 16abc8f..0000000
+++ /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 (file)
index 1e7aea6..0000000
+++ /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 (file)
index e05a3ae..0000000
+++ /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-78-x64.yml b/spec/acceptance/nodesets/debian-78-x64.yml
deleted file mode 100644 (file)
index 6ef6de8..0000000
+++ /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-78-x64:
-    roles:
-      - master
-    platform: debian-7-amd64
-    box: puppetlabs/debian-7.8-64-nocm
-    hypervisor: vagrant
-CONFIG:
-  type: foss
-...
-# 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 (file)
index 9897a8f..0000000
+++ /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 (file)
index 54dd330..0000000
+++ /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 (file)
index 598822b..0000000
+++ /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 (file)
index c2b61eb..0000000
+++ /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-1204-x64.yml b/spec/acceptance/nodesets/ubuntu-server-1204-x64.yml
deleted file mode 100644 (file)
index 29102c5..0000000
+++ /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-1204-x64:
-    roles:
-      - master
-    platform: ubuntu-12.04-amd64
-    box: puppetlabs/ubuntu-12.04-64-nocm
-    hypervisor: vagrant
-CONFIG:
-  type: foss
-...
-# 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 (file)
index 054e658..0000000
+++ /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 (file)
index bc85e0e..0000000
+++ /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 (file)
index de44654..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-require 'rspec-puppet'
-
-at_exit { RSpec::Puppet::Coverage.report! }
-# vim: syntax=ruby
index 13c4165762dfbaaeebd06efa50871268124ca57a..2f6698d5b7a53ce7011222e8eafc01ee3f582ef0 100644 (file)
@@ -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"
index ea74a52a35ef076d6e330d5a91123302863a5bef..88bca595ca13bc0cce56717b4d2404d54722c632 100644 (file)
@@ -1,10 +1,9 @@
-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
+require 'puppetlabs_spec_helper/module_spec_helper'
+require 'rspec-puppet-facts'
+include RspecPuppetFacts
 
 if Dir.exist?(File.expand_path('../../lib', __FILE__))
   require 'coveralls'
@@ -23,13 +22,13 @@ if Dir.exist?(File.expand_path('../../lib', __FILE__))
 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
-end
 
-# vim: syntax=ruby
+  # Coverage generation
+  c.after(:suite) do
+    RSpec::Puppet::Coverage.report!
+  end
+end