Fix beaker on xenial

Add a xenial nodeset and update the spec helper to install puppet 3 from
the Ubuntu repos instead of from puppetlabs. Also fix linter errors.

Change-Id: I5b4650de814a23a0ef25ee8cd73ca3591b6df44e
This commit is contained in:
Colleen Murphy 2017-06-24 16:39:56 +02:00
parent e2fb49e7ce
commit 0888a5bcd2
6 changed files with 27 additions and 8 deletions

View File

@ -20,6 +20,11 @@
# #
class storyboard::application ( class storyboard::application (
# Required parameters
$openid_url,
$mysql_user_password,
$rabbitmq_user_password,
# Installation parameters # Installation parameters
$src_root_api = '/opt/storyboard', $src_root_api = '/opt/storyboard',
$src_root_webclient = '/opt/storyboard-webclient', $src_root_webclient = '/opt/storyboard-webclient',
@ -35,7 +40,6 @@ class storyboard::application (
$authorization_code_ttl = 300, $authorization_code_ttl = 300,
$access_token_ttl = 3600, $access_token_ttl = 3600,
$refresh_token_ttl = 604800, $refresh_token_ttl = 604800,
$openid_url,
$valid_oauth_clients = [$::fqdn], $valid_oauth_clients = [$::fqdn],
$enable_token_cleanup = 'True', $enable_token_cleanup = 'True',
@ -43,13 +47,11 @@ class storyboard::application (
$mysql_port = 3306, $mysql_port = 3306,
$mysql_database = 'storyboard', $mysql_database = 'storyboard',
$mysql_user = 'storyboard', $mysql_user = 'storyboard',
$mysql_user_password,
$rabbitmq_host = 'localhost', $rabbitmq_host = 'localhost',
$rabbitmq_port = 5672, $rabbitmq_port = 5672,
$rabbitmq_vhost = '/', $rabbitmq_vhost = '/',
$rabbitmq_user = 'storyboard', $rabbitmq_user = 'storyboard',
$rabbitmq_user_password,
$enable_notifications = 'True', $enable_notifications = 'True',
$enable_cron = 'True', $enable_cron = 'True',

View File

@ -20,12 +20,12 @@
# please use individual submodules. # please use individual submodules.
# #
class storyboard ( class storyboard (
$mysql_user_password,
$rabbitmq_user_password,
$mysql_database = 'storyboard', $mysql_database = 'storyboard',
$mysql_user = 'storyboard', $mysql_user = 'storyboard',
$mysql_user_password,
$rabbitmq_user = 'storyboard', $rabbitmq_user = 'storyboard',
$rabbitmq_user_password,
$valid_oauth_clients = [$::fqdn], $valid_oauth_clients = [$::fqdn],

View File

@ -18,9 +18,9 @@
# of mysql for storyboard to connect to. # of mysql for storyboard to connect to.
# #
class storyboard::mysql ( class storyboard::mysql (
$mysql_user_password,
$mysql_database = 'storyboard', $mysql_database = 'storyboard',
$mysql_user = 'storyboard', $mysql_user = 'storyboard',
$mysql_user_password,
) { ) {
# Install MySQL # Install MySQL

View File

@ -19,8 +19,8 @@
# StoryBoard. # StoryBoard.
# #
class storyboard::rabbit ( class storyboard::rabbit (
$rabbitmq_user_password,
$rabbitmq_user = 'storyboard', $rabbitmq_user = 'storyboard',
$rabbitmq_user_password
) { ) {
require ::storyboard::params require ::storyboard::params

View File

@ -0,0 +1,10 @@
HOSTS:
ubuntu-16.04-amd64:
roles:
- master
platform: ubuntu-16.04-amd64
hypervisor: none
ip: 127.0.0.1
CONFIG:
type: foss
set_env: false

View File

@ -2,7 +2,14 @@ require 'beaker-rspec'
hosts.each do |host| hosts.each do |host|
install_puppet # puppet 3 isn't available from apt.puppetlabs.com so install it from the Xenial repos
on host, "which apt-get && apt-get install puppet -y", { :acceptable_exit_codes => [0,1] }
# otherwise use the beaker helpers to install the yum.puppetlabs.com repo and puppet
r = on host, "which yum", { :acceptable_exit_codes => [0,1] }
if r.exit_code == 0
install_puppet
end
add_platform_foss_defaults(host, 'unix')
on host, "mkdir -p #{host['distmoduledir']}" on host, "mkdir -p #{host['distmoduledir']}"
end end