Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable acceptance tests on travis; add debian 9 support #64

Merged
merged 2 commits into from
Sep 2, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .sync.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
---
.travis.yml:
secure: "LlUcdbmw7l791vD0samUkh2cuyUF49JTjlb9jIoVUYH7ZIJywSl5hZGVLmUhr4aKhPIWhLG1psAeRtjzi3xtgxP+C78RtjIZ1TE/Jglloe0heKz8E3yUfXbl/GX1B5uQhIoIZaqPZd2OuINSC4P9NvsTfai3i85JNXYs5w5QTaLToS6fU+Gb9iut8KCSPeFdA7EEDDcNJUyMVUTuc5w7/rIcPIy7AXXDDkJNdPM8m70b8Skm18afkZZ1LmwpNnsf+l1vQqtId2QyetyFOW566chSgEbswfWFxJL7g37d4l5rVBwkV/vN8iNc5NIc6oih2IqpX8fcEmx1lQ4P8mfvIm32FJ9pI1Utg80vlhzzOFrENyHyTbQ6d0fNdGo85q2ZBdXVuv+/Bq4xsXHkqke/JXMzDtGpCfLKBaY97Jlo56T313DY8NQTbO3svaazJn2EZTC0qIZ0TBBdr3qAbuF5myanxlhBcH/cpMr6rJ/7KS4XNcQPbzvompWeNoFgn0Lp49/HfX2hhGKOyRplCpO7zXzwe1WvVOh3mk5fPmHrYYffzXME0Mx0REuJGCxavsAIf26PS0+/8EMGTHemkeuRj1ISwBHkBdiiJtjIv40gcwoiTqxZsUa+aNqFb6ACN8c3jJa7slbBemUFODVc8zklYw6Dd+ojIAzIaH/eY4co3IY="
docker_sets:
- set: ubuntu1404-64
- set: ubuntu1604-64
- set: centos6-64
- set: centos7-64
- set: debian8-64
- set: debian9-64
36 changes: 36 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,42 @@ matrix:
- rvm: 2.5.1
bundler_args: --without system_tests development release
env: PUPPET_VERSION="~> 5.0" CHECK=build DEPLOY_TO_FORGE=yes
- rvm: 2.5.1
bundler_args: --without development release
dist: trusty
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=ubuntu1404-64{hypervisor=docker} CHECK=beaker
services: docker
sudo: required
- rvm: 2.5.1
bundler_args: --without development release
dist: trusty
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=ubuntu1604-64{hypervisor=docker} CHECK=beaker
services: docker
sudo: required
- rvm: 2.5.1
bundler_args: --without development release
dist: trusty
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=centos6-64{hypervisor=docker} CHECK=beaker
services: docker
sudo: required
- rvm: 2.5.1
bundler_args: --without development release
dist: trusty
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=centos7-64{hypervisor=docker} CHECK=beaker
services: docker
sudo: required
- rvm: 2.5.1
bundler_args: --without development release
dist: trusty
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=debian8-64{hypervisor=docker} CHECK=beaker
services: docker
sudo: required
- rvm: 2.5.1
bundler_args: --without development release
dist: trusty
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=debian9-64{hypervisor=docker} CHECK=beaker
services: docker
sudo: required
branches:
only:
- master
Expand Down
9 changes: 3 additions & 6 deletions metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,13 @@
"project_page": "https://github.com/voxpupuli/puppet-proxysql",
"issues_url": "https://github.com/voxpupuli/puppet-proxysql/issues",
"dependencies": [
{
"name": "puppetlabs-stdlib",
"version_requirement": ">= 4.13.1 < 6.0.0"
},
{
"name": "puppetlabs-mysql",
"version_requirement": ">= 2.5.0 < 7.0.0"
},
{
"name": "puppetlabs-apt",
"version_requirement": ">= 2.1.0 < 7.0.0"
"version_requirement": ">= 2.1.0 < 6.0.0"
}
],
"operatingsystem_support": [
Expand Down Expand Up @@ -59,7 +55,8 @@
{
"operatingsystem": "Debian",
"operatingsystemrelease": [
"8"
"8",
"9"
]
},
{
Expand Down
36 changes: 9 additions & 27 deletions spec/spec_helper_acceptance.rb
Original file line number Diff line number Diff line change
@@ -1,37 +1,19 @@
require 'beaker-rspec/spec_helper'
require 'beaker-rspec/helpers/serverspec'
require 'beaker-rspec'
require 'beaker-puppet'
require 'beaker/puppet_install_helper'
require 'beaker/module_install_helper'

run_puppet_install_helper unless ENV['BEAKER_provision'] == 'no'
install_ca_certs unless ENV['PUPPET_INSTALL_TYPE'] =~ %r{pe}i
install_module_on(hosts)
install_module_dependencies_on(hosts)

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
puppet_module_install(source: proj_root, module_name: 'proxysql')
hosts.each do |host|
on host, puppet('module', 'install', 'puppetlabs-stdlib', '--version', '4.11.0'), acceptable_exit_codes: [0, 1]

# uncomment the section below to add needed git repositories
# replace the module rbldnsd with the module(s) you need

# on host, puppet('resource','package', 'git', 'ensure=present'), { :acceptable_exit_codes => [0,1] }
# git_repos = [
# { :mod => 'rbldnsd', :repo => 'https://github.com/rgevaert/puppet-rbldnsd.git', :ref => '1.0.0' },
# ]
# git_repos.each do |g|
# step "Installing puppet module \'#{g[:repo]}\' from git on Master"
# shell("[ -d /etc/puppetlabs/code/environments/production/modules/#{g[:mod]} ] || git clone #{g[:repo]} /etc/puppetlabs/code/environments/production/modules/#{g[:mod]}")
# if g[:ref]
# shell("cd /etc/puppetlabs/code/environments/production/modules/#{g[:mod]}; git checkout #{g[:ref]}")
# end
# end
hosts.each do |host|
if host[:platform] =~ %r{el-7-x86_64} && host[:hypervisor] =~ %r{docker}
on(host, "sed -i '/nodocs/d' /etc/yum.conf")
end
end
end