From f36f796eca4693b6bb2217bf751212002e26bdbf Mon Sep 17 00:00:00 2001 From: tphoney Date: Tue, 30 Jul 2019 15:06:02 +0100 Subject: [PATCH] more acceptance test setup. --- .travis.yml | 69 ++++++++++++++++++++++++---- Gemfile | 1 - provision.yaml | 4 +- spec/spec_helper_acceptance_local.rb | 15 ++++++ 4 files changed, 78 insertions(+), 11 deletions(-) diff --git a/.travis.yml b/.travis.yml index f4c701d046..6e28be1865 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,7 +30,7 @@ matrix: bundler_args: dist: trusty env: PLATFORMS=deb_puppet5 - rvm: 2.5.1 + rvm: 2.5.3 before_script: - bundle exec rake 'litmus:provision_list[travis_deb]' - bundle exec bolt command run 'apt-get install wget -y' --inventoryfile inventory.yaml --nodes='*' @@ -44,7 +44,7 @@ matrix: bundler_args: dist: trusty env: PLATFORMS=deb_puppet6 - rvm: 2.5.1 + rvm: 2.5.3 before_script: - bundle exec rake 'litmus:provision_list[travis_deb]' - bundle exec bolt command run 'apt-get install wget -y' --inventoryfile inventory.yaml --nodes='*' @@ -57,10 +57,63 @@ matrix: - bundler_args: dist: trusty - env: PLATFORMS=el_puppet5 - rvm: 2.5.1 + env: PLATFORMS=scientific6_puppet5 + rvm: 2.5.3 + before_script: + - bundle exec rake 'litmus:provision[docker, scientificlinux6]' + - bundle exec rake 'litmus:install_agent[puppet5]' + - bundle exec rake litmus:install_module + script: + - bundle exec rake litmus:acceptance:parallel + services: docker + sudo: required + - + bundler_args: + dist: trusty + env: PLATFORMS=scientific6_puppet6 + rvm: 2.5.3 + before_script: + - bundle exec rake 'litmus:provision[docker, scientificlinux6]' + - bundle exec rake 'litmus:install_agent[puppet6]' + - bundle exec rake litmus:install_module + script: + - bundle exec rake litmus:acceptance:parallel + services: docker + sudo: required + - + bundler_args: + dist: trusty + env: PLATFORMS=centos6_puppet5 + rvm: 2.5.3 + before_script: + - bundle exec rake 'litmus:provision[docker, waffleimage/centos6]' + - bundle exec rake 'litmus:install_agent[puppet5]' + - bundle exec rake litmus:install_module + script: + - bundle exec rake litmus:acceptance:parallel + services: docker + sudo: required + - + bundler_args: + dist: trusty + env: PLATFORMS=centos6_puppet6 + rvm: 2.5.3 before_script: - - bundle exec rake 'litmus:provision_list[travis_el]' + - bundle exec rake 'litmus:provision[docker, waffleimage/centos6]' + - bundle exec rake 'litmus:install_agent[puppet6]' + - bundle exec rake litmus:install_module + script: + - bundle exec rake litmus:acceptance:parallel + services: docker + sudo: required + + - + bundler_args: + dist: trusty + env: PLATFORMS=el7_puppet5 + rvm: 2.5.3 + before_script: + - bundle exec rake 'litmus:provision_list[travis_el7]' - bundle exec rake 'litmus:install_agent[puppet5]' - bundle exec rake litmus:install_module script: @@ -70,10 +123,10 @@ matrix: - bundler_args: dist: trusty - env: PLATFORMS=el_puppet6 - rvm: 2.5.1 + env: PLATFORMS=el7_puppet6 + rvm: 2.5.3 before_script: - - bundle exec rake 'litmus:provision_list[travis_el]' + - bundle exec rake 'litmus:provision_list[travis_el7]' - bundle exec rake 'litmus:install_agent[puppet6]' - bundle exec rake litmus:install_module script: diff --git a/Gemfile b/Gemfile index 731902c467..0e94796156 100644 --- a/Gemfile +++ b/Gemfile @@ -15,7 +15,6 @@ end ruby_version_segments = Gem::Version.new(RUBY_VERSION.dup).segments minor_version = ruby_version_segments[0..1].join('.') -gem 'rb-readline' group :development do gem "fast_gettext", '1.1.0', require: false if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.1.0') gem "fast_gettext", require: false if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.1.0') diff --git a/provision.yaml b/provision.yaml index 0ecd877ee2..a309065b6a 100644 --- a/provision.yaml +++ b/provision.yaml @@ -5,8 +5,8 @@ default: travis_deb: provisioner: docker images: ['waffleimage/debian8', 'waffleimage/debian9', 'waffleimage/ubuntu14.04', 'waffleimage/ubuntu16.04', 'waffleimage/ubuntu18.04'] -travis_el: - provisioner: docker_exp +travis_el7: + provisioner: docker images: ['waffleimage/centos7', 'waffleimage/oraclelinux7', 'waffleimage/scientificlinux7'] release_checks: provisioner: vmpooler diff --git a/spec/spec_helper_acceptance_local.rb b/spec/spec_helper_acceptance_local.rb index 25edced5da..c97eebd63a 100644 --- a/spec/spec_helper_acceptance_local.rb +++ b/spec/spec_helper_acceptance_local.rb @@ -1,17 +1,29 @@ # frozen_string_literal: true RSpec.configure do |c| + # IPv6 is not enabled by default in the new travis-ci Trusty environment (see https://github.com/travis-ci/travis-ci/issues/8891 ) + if ENV['CI'] == 'true' + c.filter_run_excluding ipv6: true + end c.before :suite do run_shell('puppet module install stahnma/epel') pp = <<-PUPPETCODE + # needed by tests package { 'curl': ensure => 'latest', } + # needed for netstat, for serverspec checks if $::osfamily == 'SLES' or $::osfamily == 'SUSE' { package { 'net-tools-deprecated': ensure => 'latest', } } + # needed for ss, for serverspec checks + if $::operatingsystem == 'Ubuntu' and $::operatingsystemmajrelease !~ /14.04|16.04/ { + package { 'iproute2': + ensure => 'latest', + } + } if $::osfamily == 'RedHat' { if $::operatingsystemmajrelease == '5' or $::operatingsystemmajrelease == '6'{ class { 'epel': @@ -24,6 +36,9 @@ class { 'epel': } } PUPPETCODE apply_manifest(pp) + + # Make sure selinux is disabled so the tests work. + run_shell('setenforce 0', expect_failures: true) if os[:family] =~ %r{redhat|oracle} end end