Merge "Fix beaker on xenial"

This commit is contained in:
Jenkins 2017-06-14 23:57:12 +00:00 committed by Gerrit Code Review
commit 4799d1a472
4 changed files with 23 additions and 2 deletions

View File

@ -20,9 +20,12 @@ os.environ.setdefault("DJANGO_SETTINGS_MODULE", "graphite.settings")
import sys
import ConfigParser
import django
from django.core import management
from django.contrib.auth import models as auth_models
django.setup()
config = ConfigParser.ConfigParser()
config.read(os.path.expanduser(sys.argv[1]))

View File

@ -155,6 +155,6 @@ describe 'puppet-graphite module', :if => ['debian', 'ubuntu'].include?(os[:fami
end
describe cron do
it { should have_entry('0 2 * * * find /var/lib/graphite/storage/whisper -type f -mtime +270 -name \\\\*.wsp -delete; find /var/lib/graphite/storage/whisper -depth -type d -empty -delete > /dev/null').with_user('root') }
it { should have_entry('0 2 * * * find /var/lib/graphite/storage/whisper -type f -mtime +270 -name \*.wsp -delete; find /var/lib/graphite/storage/whisper -depth -type d -empty -delete > /dev/null').with_user('root') }
end
end

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,15 @@ require 'beaker-rspec'
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']}"
end