Add tests for the disk_management Puppet module
Change-Id: I2e4539650ac36265462e9778d88aa1c91f7bcce5
This commit is contained in:
parent
6662bd6641
commit
f89264be98
|
@ -0,0 +1,7 @@
|
|||
fixtures:
|
||||
repositories:
|
||||
stdlib:
|
||||
repo: "git://github.com/puppetlabs/puppetlabs-stdlib"
|
||||
ref: "4.7.0"
|
||||
symlinks:
|
||||
disk_management: "#{source_dir}"
|
|
@ -0,0 +1,2 @@
|
|||
spec/fixtures/modules/*
|
||||
spec/fixtures/manifests/*
|
|
@ -0,0 +1,24 @@
|
|||
# Copyright 2015 Mirantis, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
source 'https://rubygems.org'
|
||||
|
||||
group :development, :test do
|
||||
gem 'rake'
|
||||
gem "puppet", ENV['PUPPET_VERSION'] || '~> 3.4.0'
|
||||
gem 'rspec'
|
||||
gem 'rspec-puppet'
|
||||
gem 'rspec-puppet-facts'
|
||||
gem 'puppetlabs_spec_helper'
|
||||
gem 'metadata-json-lint'
|
||||
end
|
|
@ -0,0 +1,62 @@
|
|||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
diff-lcs (1.2.5)
|
||||
facter (1.7.6)
|
||||
hiera (1.3.4)
|
||||
json_pure
|
||||
json (1.8.3)
|
||||
json_pure (1.8.2)
|
||||
metaclass (0.0.4)
|
||||
metadata-json-lint (0.0.6)
|
||||
json
|
||||
spdx-licenses (~> 1.0)
|
||||
mocha (1.1.0)
|
||||
metaclass (~> 0.0.1)
|
||||
puppet (3.4.3)
|
||||
facter (~> 1.6)
|
||||
hiera (~> 1.0)
|
||||
rgen (~> 0.6.5)
|
||||
puppet-lint (1.1.0)
|
||||
puppet-syntax (2.0.0)
|
||||
rake
|
||||
puppetlabs_spec_helper (0.10.3)
|
||||
mocha
|
||||
puppet-lint
|
||||
puppet-syntax
|
||||
rake
|
||||
rspec-puppet
|
||||
rake (10.4.2)
|
||||
rgen (0.6.6)
|
||||
rspec (3.3.0)
|
||||
rspec-core (~> 3.3.0)
|
||||
rspec-expectations (~> 3.3.0)
|
||||
rspec-mocks (~> 3.3.0)
|
||||
rspec-core (3.3.2)
|
||||
rspec-support (~> 3.3.0)
|
||||
rspec-expectations (3.3.1)
|
||||
diff-lcs (>= 1.2.0, < 2.0)
|
||||
rspec-support (~> 3.3.0)
|
||||
rspec-mocks (3.3.2)
|
||||
diff-lcs (>= 1.2.0, < 2.0)
|
||||
rspec-support (~> 3.3.0)
|
||||
rspec-puppet (2.2.0)
|
||||
rspec
|
||||
rspec-puppet-facts (0.12.0)
|
||||
facter
|
||||
json
|
||||
rspec-support (3.3.0)
|
||||
spdx-licenses (1.0.0)
|
||||
json
|
||||
|
||||
PLATFORMS
|
||||
ruby
|
||||
|
||||
DEPENDENCIES
|
||||
metadata-json-lint
|
||||
puppet (~> 3.4.0)
|
||||
puppetlabs_spec_helper
|
||||
rake
|
||||
rspec
|
||||
rspec-puppet
|
||||
rspec-puppet-facts
|
|
@ -0,0 +1,25 @@
|
|||
require 'puppetlabs_spec_helper/rake_tasks'
|
||||
require 'puppet-lint/tasks/puppet-lint'
|
||||
require 'puppet-syntax/tasks/puppet-syntax'
|
||||
require 'metadata-json-lint/rake_task'
|
||||
|
||||
PuppetLint.configuration.fail_on_warnings = true
|
||||
PuppetLint.configuration.send('disable_80chars')
|
||||
PuppetLint.configuration.send('disable_class_inherits_from_params_class')
|
||||
PuppetLint.configuration.send('disable_class_parameter_defaults')
|
||||
|
||||
exclude_paths = [
|
||||
"pkg/**/*",
|
||||
"vendor/**/*",
|
||||
"spec/**/*",
|
||||
]
|
||||
PuppetLint.configuration.ignore_paths = exclude_paths
|
||||
PuppetSyntax.exclude_paths = exclude_paths
|
||||
|
||||
desc "Run metadata_lint, lint, syntax, and spec tests."
|
||||
task :test => [
|
||||
:metadata_lint,
|
||||
:lint,
|
||||
:syntax,
|
||||
:spec,
|
||||
]
|
|
@ -3,7 +3,7 @@
|
|||
"version": "1.0.0",
|
||||
"author": "Guillaume Thouvenin <gthouvenin@mirantis.com>",
|
||||
"summary": "Partition and configure disks",
|
||||
"license": "Apache License 2.0",
|
||||
"license": "Apache-2.0",
|
||||
"source": "git://git.openstack.org/cgit/stackforge/fuel-plugin-elasticsearch-kibana.git",
|
||||
"project_page": "none",
|
||||
"issues_url": "none",
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
--format
|
||||
s
|
||||
--colour
|
||||
--loadby
|
||||
mtime
|
||||
--backtrace
|
|
@ -0,0 +1,22 @@
|
|||
# Copyright 2015 Mirantis, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
require 'rspec-puppet'
|
||||
|
||||
fixture_path = File.expand_path(File.join(__FILE__, '..', 'fixtures'))
|
||||
|
||||
RSpec.configure do |c|
|
||||
c.module_path = File.join(fixture_path, 'modules')
|
||||
c.manifest_dir = File.join(fixture_path, 'manifests')
|
||||
c.environmentpath = File.join(Dir.pwd, 'spec')
|
||||
end
|
9
tox.ini
9
tox.ini
|
@ -1,5 +1,5 @@
|
|||
[tox]
|
||||
envlist = lma_logging_analytics
|
||||
envlist = lma_logging_analytics,disk_management
|
||||
skipsdist = True
|
||||
|
||||
[testenv:lma_logging_analytics]
|
||||
|
@ -10,3 +10,10 @@ commands =
|
|||
bundle install
|
||||
bundle exec rake test
|
||||
|
||||
[testenv:disk_management]
|
||||
deps =
|
||||
changedir = {toxinidir}/deployment_scripts/puppet/modules/{envname}
|
||||
whitelist_externals = bundle
|
||||
commands =
|
||||
bundle install
|
||||
bundle exec rake test
|
||||
|
|
Loading…
Reference in New Issue