Skip to content

Commit

Permalink
Update based on voxpupuli/modulesync_config 0.14.1. This might fix #27
Browse files Browse the repository at this point in the history
  • Loading branch information
dhoppe committed Oct 22, 2016
1 parent f3324fc commit 0f49a0c
Show file tree
Hide file tree
Showing 25 changed files with 255 additions and 33 deletions.
9 changes: 7 additions & 2 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ check various syntax and style things. You can run these locally with:
bundle exec rake lint
bundle exec rake validate

It will also run some [Rubocop](http://batsov.com/rubocop/) tests
against it. You can run those locally ahead of time with:

bundle exec rake rubocop

## Running the unit tests

The unit test suite covers most of the code, as mentioned above please
Expand Down Expand Up @@ -85,9 +90,9 @@ with:
bundle exec rake acceptance

This will run the tests on an Ubuntu 12.04 virtual machine. You can also
run the integration tests against Centos 6.5 with.
run the integration tests against Centos 6.6 with.

BEAKER_set=centos-64-x64 bundle exec rake acceptances
BEAKER_set=centos-66-x64 bundle exec rake acceptances

If you don't want to have to recreate the virtual machine every time you
can use `BEAKER_DESTROY=no` and `BEAKER_PROVISION=no`. On the first run you will
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ Gemfile.lock
Gemfile.local
vendor/
.vendor/
spec/fixtures/
spec/fixtures/manifests/
spec/fixtures/modules/
.vagrant/
.bundle/
coverage/
Expand Down
2 changes: 1 addition & 1 deletion .msync.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
modulesync_config_version: '0.12.2'
modulesync_config_version: '0.14.1'
4 changes: 4 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ AllCops:
Include:
- ./**/*.rb
Exclude:
- files/**/*
- vendor/**/*
- .vendor/**/*
- pkg/**/*
Expand Down Expand Up @@ -56,6 +57,9 @@ Style/AndOr:
Style/RedundantSelf:
Enabled: True

Metric/BlockLength:
Enabled: False

# Method length is not necessarily an indicator of code quality
Metrics/MethodLength:
Enabled: False
Expand Down
22 changes: 11 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,20 @@ matrix:
env: PUPPET_VERSION="~> 3.0" STRICT_VARIABLES="yes" CHECK=test
- rvm: 1.9.3
env: PUPPET_VERSION="~> 3.0" STRICT_VARIABLES="yes" FUTURE_PARSER="yes" CHECK=test
- rvm: 2.1
- rvm: 2.1.9
env: PUPPET_VERSION="~> 3.0" STRICT_VARIABLES="yes" CHECK=test
- rvm: 2.1
env: PUPPET_VERSION="~> 4.0" STRICT_VARIABLES="yes" CHECK=test
- rvm: 2.2
env: PUPPET_VERSION="~> 4.0" STRICT_VARIABLES="yes" CHECK=test
- rvm: 2.1.9
env: PUPPET_VERSION="~> 4.0" CHECK=test
- rvm: 2.2.5
env: PUPPET_VERSION="~> 4.0" CHECK=test
- rvm: 2.3.1
env: PUPPET_VERSION="~> 4.0" STRICT_VARIABLES="yes" CHECK=build
env: PUPPET_VERSION="~> 4.0" CHECK=build DEPLOY_TO_FORGE=yes
- rvm: 2.3.1
env: PUPPET_VERSION="~> 4.0" STRICT_VARIABLES="yes" CHECK=rubocop
env: PUPPET_VERSION="~> 4.0" CHECK=rubocop
- rvm: 2.3.1
env: PUPPET_VERSION="~> 4.0" STRICT_VARIABLES="yes" CHECK=test
env: PUPPET_VERSION="~> 4.0" CHECK=test
- rvm: 2.4.0-preview1
env: PUPPET_VERSION="~> 4.0" STRICT_VARIABLES="yes" CHECK=test
env: PUPPET_VERSION="~> 4.0" CHECK=test
allow_failures:
- rvm: 2.4.0-preview1
notifications:
Expand All @@ -48,5 +48,5 @@ deploy:
tags: true
# all_branches is required to use tags
all_branches: true
# Only publish if our main Ruby target builds
rvm: 2.3.1
# Only publish the build marked with "DEPLOY_TO_FORGE"
condition: "$DEPLOY_TO_FORGE = yes"
8 changes: 5 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def location_for(place, fake_version = nil)
end

group :test do
gem 'puppetlabs_spec_helper', :require => false
gem 'puppetlabs_spec_helper', '~> 1.2.2', :require => false
gem 'rspec-puppet', :require => false, :git => 'https://github.com/rodjek/rspec-puppet.git'
gem 'rspec-puppet-facts', :require => false
gem 'rspec-puppet-utils', :require => false
Expand All @@ -22,13 +22,14 @@ group :test do
gem 'puppet-lint-classes_and_types_beginning_with_digits-check', :require => false
gem 'puppet-lint-unquoted_string-check', :require => false
gem 'puppet-lint-variable_contains_upcase', :require => false
gem 'puppet-lint', '2.0.0', :require => false
gem 'metadata-json-lint', :require => false
gem 'puppet-blacksmith', :require => false
gem 'voxpupuli-release', :require => false, :git => 'https://github.com/voxpupuli/voxpupuli-release-gem.git'
gem 'puppet-strings', :require => false, :git => 'https://github.com/puppetlabs/puppetlabs-strings.git'
gem 'puppet-strings', '~> 0.99.0', :require => false
gem 'rubocop-rspec', '~> 1.6', :require => false if RUBY_VERSION >= '2.3.0'
gem 'json_pure', '<= 2.0.1', :require => false if RUBY_VERSION < '2.0.0'
gem 'mocha', '>= 1.2.1', :require => false
gem 'coveralls', :require => false if RUBY_VERSION >= '2.0.0'
end

group :development do
Expand All @@ -46,6 +47,7 @@ group :system_tests do
else
gem 'beaker-rspec', :require => false
end
gem 'serverspec', :require => false
gem 'beaker-puppet_install_helper', :require => false
end

Expand Down
19 changes: 4 additions & 15 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,18 +1,9 @@
require 'puppetlabs_spec_helper/rake_tasks'
require 'puppet_blacksmith/rake_tasks'
require 'voxpupuli/release/rake_tasks'
require 'puppet-strings/rake_tasks'
require 'puppet-strings/tasks'

if RUBY_VERSION >= '2.3.0'
require 'rubocop/rake_task'

RuboCop::RakeTask.new(:rubocop) do |task|
# These make the rubocop experience maybe slightly less terrible
task.options = ['-D', '-S', '-E']
end
end

PuppetLint.configuration.log_format = '%{path}:%{linenumber}:%{check}:%{KIND}:%{message}'
PuppetLint.configuration.log_format = '%{path}:%{line}:%{check}:%{KIND}:%{message}'
PuppetLint.configuration.fail_on_warnings = true
PuppetLint.configuration.send('relative')
PuppetLint.configuration.send('disable_140chars')
Expand All @@ -34,11 +25,9 @@ RSpec::Core::RakeTask.new(:acceptance) do |t|
t.pattern = 'spec/acceptance'
end

desc 'Run tests metadata_lint, lint, syntax, spec'
desc 'Run tests metadata_lint, release_checks'
task test: [
:metadata_lint,
:lint,
:syntax,
:spec,
:release_checks,
]
# vim: syntax=ruby
3 changes: 3 additions & 0 deletions spec/acceptance/nodesets/centos-511-x64.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
---
# This file is managed via modulesync
# https://github.com/voxpupuli/modulesync
# https://github.com/voxpupuli/modulesync_config
HOSTS:
centos-511-x64:
roles:
Expand Down
3 changes: 3 additions & 0 deletions spec/acceptance/nodesets/centos-66-x64-pe.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
---
# This file is managed via modulesync
# https://github.com/voxpupuli/modulesync
# https://github.com/voxpupuli/modulesync_config
HOSTS:
centos-66-x64:
roles:
Expand Down
3 changes: 3 additions & 0 deletions spec/acceptance/nodesets/centos-66-x64.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
---
# This file is managed via modulesync
# https://github.com/voxpupuli/modulesync
# https://github.com/voxpupuli/modulesync_config
HOSTS:
centos-66-x64:
roles:
Expand Down
3 changes: 3 additions & 0 deletions spec/acceptance/nodesets/centos-72-x64.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
---
# This file is managed via modulesync
# https://github.com/voxpupuli/modulesync
# https://github.com/voxpupuli/modulesync_config
HOSTS:
centos-72-x64:
roles:
Expand Down
3 changes: 3 additions & 0 deletions spec/acceptance/nodesets/debian-78-x64.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
---
# This file is managed via modulesync
# https://github.com/voxpupuli/modulesync
# https://github.com/voxpupuli/modulesync_config
HOSTS:
debian-78-x64:
roles:
Expand Down
3 changes: 3 additions & 0 deletions spec/acceptance/nodesets/debian-82-x64.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
---
# This file is managed via modulesync
# https://github.com/voxpupuli/modulesync
# https://github.com/voxpupuli/modulesync_config
HOSTS:
debian-82-x64:
roles:
Expand Down
22 changes: 22 additions & 0 deletions spec/acceptance/nodesets/docker/centos-5.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
# This file is managed via modulesync
# https://github.com/voxpupuli/modulesync
# https://github.com/voxpupuli/modulesync_config
HOSTS:
centos-5-x64:
default_apply_opts:
order: random
strict_variables:
platform: el-5-x86_64
hypervisor : docker
image: tianon/centos:5.10
docker_preserve_image: true
docker_cmd: '["/sbin/init"]'
docker_image_commands:
- 'yum install -y crontabs tar wget which'
- 'sed -i -e "/mingetty/d" /etc/inittab'
CONFIG:
type: aio
log_level: debug
...
# vim: syntax=yaml
23 changes: 23 additions & 0 deletions spec/acceptance/nodesets/docker/centos-6.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
# This file is managed via modulesync
# https://github.com/voxpupuli/modulesync
# https://github.com/voxpupuli/modulesync_config
HOSTS:
centos-6-x64:
default_apply_opts:
order: random
strict_variables:
platform: el-6-x86_64
hypervisor : docker
image: centos:6
docker_preserve_image: true
docker_cmd: '["/sbin/init"]'
docker_image_commands:
- 'rm -rf /var/run/network/*'
- 'yum install -y crontabs tar wget'
- 'rm /etc/init/tty.conf'
CONFIG:
type: aio
log_level: debug
...
# vim: syntax=yaml
21 changes: 21 additions & 0 deletions spec/acceptance/nodesets/docker/centos-7.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
# This file is managed via modulesync
# https://github.com/voxpupuli/modulesync
# https://github.com/voxpupuli/modulesync_config
HOSTS:
centos-7-x64:
default_apply_opts:
order: random
strict_variables:
platform: el-7-x86_64
hypervisor : docker
image: centos:7
docker_preserve_image: true
docker_cmd: '["/usr/sbin/init"]'
docker_image_commands:
- 'yum install -y crontabs tar wget iproute'
CONFIG:
type: aio
log_level: debug
...
# vim: syntax=yaml
21 changes: 21 additions & 0 deletions spec/acceptance/nodesets/docker/debian-7.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
# This file is managed via modulesync
# https://github.com/voxpupuli/modulesync
# https://github.com/voxpupuli/modulesync_config
HOSTS:
debian-7-x64:
default_apply_opts:
order: random
strict_variables:
platform: debian-7-amd64
hypervisor : docker
image: debian:7
docker_preserve_image: true
docker_cmd: '["/sbin/init"]'
docker_image_commands:
- 'apt-get install -y cron locales-all net-tools wget'
CONFIG:
type: aio
log_level: debug
...
# vim: syntax=yaml
22 changes: 22 additions & 0 deletions spec/acceptance/nodesets/docker/debian-8.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
# This file is managed via modulesync
# https://github.com/voxpupuli/modulesync
# https://github.com/voxpupuli/modulesync_config
HOSTS:
debian-8-x64:
default_apply_opts:
order: random
strict_variables:
platform: debian-8-amd64
hypervisor : docker
image: debian:8
docker_preserve_image: true
docker_cmd: '["/sbin/init"]'
docker_image_commands:
- 'apt-get install -y cron locales-all net-tools wget'
- 'rm -f /usr/sbin/policy-rc.d'
CONFIG:
type: aio
log_level: debug
...
# vim: syntax=yaml
22 changes: 22 additions & 0 deletions spec/acceptance/nodesets/docker/ubuntu-12.04.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
# This file is managed via modulesync
# https://github.com/voxpupuli/modulesync
# https://github.com/voxpupuli/modulesync_config
HOSTS:
ubuntu-1204-x64:
default_apply_opts:
order: random
strict_variables:
platform: ubuntu-12.04-amd64
hypervisor : docker
image: ubuntu:12.04
docker_preserve_image: true
docker_cmd: '["/sbin/init"]'
docker_image_commands:
- 'apt-get install -y net-tools wget'
- 'locale-gen en_US.UTF-8'
CONFIG:
type: aio
log_level: debug
...
# vim: syntax=yaml
24 changes: 24 additions & 0 deletions spec/acceptance/nodesets/docker/ubuntu-14.04.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
# This file is managed via modulesync
# https://github.com/voxpupuli/modulesync
# https://github.com/voxpupuli/modulesync_config
HOSTS:
ubuntu-1404-x64:
default_apply_opts:
order: random
strict_variables:
platform: ubuntu-14.04-amd64
hypervisor : docker
image: ubuntu:14.04
docker_preserve_image: true
docker_cmd: '["/sbin/init"]'
docker_image_commands:
- 'rm /usr/sbin/policy-rc.d'
- 'rm /sbin/initctl; dpkg-divert --rename --remove /sbin/initctl'
- 'apt-get install -y net-tools wget'
- 'locale-gen en_US.UTF-8'
CONFIG:
type: aio
log_level: debug
...
# vim: syntax=yaml
22 changes: 22 additions & 0 deletions spec/acceptance/nodesets/docker/ubuntu-16.04.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
# This file is managed via modulesync
# https://github.com/voxpupuli/modulesync
# https://github.com/voxpupuli/modulesync_config
HOSTS:
ubuntu-1604-x64:
default_apply_opts:
order: random
strict_variables:
platform: ubuntu-16.04-amd64
hypervisor : docker
image: ubuntu:16.04
docker_preserve_image: true
docker_cmd: '["/sbin/init"]'
docker_image_commands:
- 'apt-get install -y net-tools wget'
- 'locale-gen en_US.UTF-8'
CONFIG:
type: aio
log_level: debug
...
# vim: syntax=yaml
Loading

0 comments on commit 0f49a0c

Please sign in to comment.