acceptance: Added noop acceptance test
gnocchi packaging is not yet ready, thus we cant do functional testing on this module, but beaker jobs are now voting in the OpenStack CI this therefore blocks all patches on puppet-gnocchi module. This patch add a noop acceptance test in order to unlock the CI for puppet-gnocchi. This patch also inclued https://review.openstack.org/#/c/195486/ lint: Fix lint issues (missing documentation for define types) The gem 'puppet-lint-param-docs' was bumped to 1.2.0 and now handle class and define type. This patch fix lint issues (missing documentation). Change-Id: I6f46d82c14b950ce511d9000f72eeb3220f782c3
This commit is contained in:
parent
8bb2319e56
commit
efa68f8d01
1
Gemfile
1
Gemfile
|
@ -16,6 +16,7 @@ group :development, :test do
|
|||
gem 'puppet-lint-variable_contains_upcase'
|
||||
gem 'puppet-lint-numericvariable'
|
||||
|
||||
gem 'beaker-rspec', :require => false
|
||||
gem 'json'
|
||||
gem 'webmock'
|
||||
end
|
||||
|
|
|
@ -27,6 +27,26 @@
|
|||
# This define creates a service resource with title gnocchi-${name} and
|
||||
# conditionally creates a package resource with title gnocchi-${name}
|
||||
#
|
||||
# === Parameters:
|
||||
#
|
||||
# [*package_name*]
|
||||
# (mandatory) The package name (for the generic_service)
|
||||
#
|
||||
# [*service_name*]
|
||||
# (mandatory) The service name (for the generic_service)
|
||||
#
|
||||
# [*enabled*]
|
||||
# (optional) Define if the service must be enabled or not
|
||||
# Defaults to false.
|
||||
#
|
||||
# [*manage_service*]
|
||||
# (optional) Manage or not the service (if a service_name is provided).
|
||||
# Defaults to true.
|
||||
#
|
||||
# [*ensure_package*]
|
||||
# (optional) Control the ensure parameter for the package ressource.
|
||||
# Defaults to 'present'.
|
||||
#
|
||||
define gnocchi::generic_service(
|
||||
$package_name,
|
||||
$service_name,
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
require 'spec_helper_acceptance'
|
|
@ -0,0 +1,11 @@
|
|||
HOSTS:
|
||||
ubuntu-server-1404-x64:
|
||||
roles:
|
||||
- master
|
||||
platform: ubuntu-14.04-amd64
|
||||
box : puppetlabs/ubuntu-14.04-64-nocm
|
||||
box_url : https://vagrantcloud.com/puppetlabs/ubuntu-14.04-64-nocm
|
||||
hypervisor : vagrant
|
||||
CONFIG:
|
||||
log_level : debug
|
||||
type: git
|
|
@ -0,0 +1,10 @@
|
|||
HOSTS:
|
||||
centos-70-x64:
|
||||
roles:
|
||||
- master
|
||||
platform: el-7-x86_64
|
||||
hypervisor : none
|
||||
ip: 127.0.0.1
|
||||
CONFIG:
|
||||
type: foss
|
||||
set_env: false
|
|
@ -0,0 +1,10 @@
|
|||
HOSTS:
|
||||
ubuntu-14.04-amd64:
|
||||
roles:
|
||||
- master
|
||||
platform: ubuntu-14.04-amd64
|
||||
hypervisor : none
|
||||
ip: 127.0.0.1
|
||||
CONFIG:
|
||||
type: foss
|
||||
set_env: false
|
|
@ -0,0 +1,11 @@
|
|||
HOSTS:
|
||||
ubuntu-server-1404-x64:
|
||||
roles:
|
||||
- master
|
||||
platform: ubuntu-14.04-amd64
|
||||
box : puppetlabs/ubuntu-14.04-64-nocm
|
||||
box_url : https://vagrantcloud.com/puppetlabs/ubuntu-14.04-64-nocm
|
||||
hypervisor : vagrant
|
||||
CONFIG:
|
||||
log_level : debug
|
||||
type: git
|
|
@ -0,0 +1,52 @@
|
|||
require 'beaker-rspec'
|
||||
|
||||
hosts.each do |host|
|
||||
|
||||
install_puppet
|
||||
|
||||
on host, "mkdir -p #{host['distmoduledir']}"
|
||||
end
|
||||
|
||||
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
|
||||
hosts.each do |host|
|
||||
|
||||
# install git
|
||||
install_package host, 'git'
|
||||
|
||||
# clean out any module cruft
|
||||
shell('rm -fr /etc/puppet/modules/*')
|
||||
|
||||
# install library modules from the forge
|
||||
on host, puppet('module','install','puppetlabs-mysql'), { :acceptable_exit_codes => 0 }
|
||||
on host, puppet('module','install','dprince/qpid'), { :acceptable_exit_codes => 0 }
|
||||
on host, puppet('module','install','duritong/sysctl'), { :acceptable_exit_codes => 0 }
|
||||
on host, puppet('module','install','puppetlabs-inifile'), { :acceptable_exit_codes => 0 }
|
||||
on host, puppet('module','install','stahnma-epel'), { :acceptable_exit_codes => 0 }
|
||||
# pin apt module until openstack_extras use >= 2.0.0 version
|
||||
on host, puppet('module','install','puppetlabs-apt','--version','1.8.0'), { :acceptable_exit_codes => 0 }
|
||||
|
||||
# install puppet modules from git, use master
|
||||
shell('git clone https://git.openstack.org/openstack/puppet-openstacklib /etc/puppet/modules/openstacklib')
|
||||
shell('git clone https://git.openstack.org/openstack/puppet-openstack_extras /etc/puppet/modules/openstack_extras')
|
||||
shell('git clone https://git.openstack.org/openstack/puppet-keystone /etc/puppet/modules/keystone')
|
||||
shell('git clone https://git.openstack.org/openstack/puppet-ceilometer /etc/puppet/modules/ceilometer')
|
||||
# TODO(EmilienM) Cloning RabbitMQ module for now because we wait for a release including
|
||||
# https://github.com/enovance/puppetlabs-rabbitmq/commit/0227f762070ffbbea3c28d6a60174de98fa4cc1c
|
||||
shell('git clone https://github.com/puppetlabs/puppetlabs-rabbitmq/ /etc/puppet/modules/rabbitmq')
|
||||
|
||||
# Install the module being tested
|
||||
puppet_module_install(:source => proj_root, :module_name => 'nova')
|
||||
# List modules installed to help with debugging
|
||||
on hosts[0], puppet('module','list'), { :acceptable_exit_codes => 0 }
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue