Skip to content

Commit

Permalink
more acceptance test setup.
Browse files Browse the repository at this point in the history
  • Loading branch information
tphoney committed Jul 31, 2019
1 parent bf84bc6 commit f36f796
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 11 deletions.
69 changes: 61 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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='*'
Expand All @@ -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='*'
Expand All @@ -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:
Expand All @@ -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:
Expand Down
1 change: 0 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
4 changes: 2 additions & 2 deletions provision.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
15 changes: 15 additions & 0 deletions spec/spec_helper_acceptance_local.rb
Original file line number Diff line number Diff line change
@@ -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':
Expand All @@ -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

Expand Down

0 comments on commit f36f796

Please sign in to comment.