From 005f06f3dde8198fac2ca1a0206e05157e927d3c Mon Sep 17 00:00:00 2001 From: varac Date: Sun, 20 Dec 2015 01:57:04 +0100 Subject: [tests] Use beaker+docker for acceptance tests Beaker together with docker is a very fast way to do acceptance testing. This commit adds basic beaker/docker support: - Add a debian jessie nodeset - Test if the module applies idempotentially, so it doesn't change resources on a second run with the same parameters. https://github.com/puppetlabs/beaker/blob/master/docs/Docker-Support.md --- Gemfile | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'Gemfile') diff --git a/Gemfile b/Gemfile index 8925a90..a2756c4 100644 --- a/Gemfile +++ b/Gemfile @@ -11,3 +11,10 @@ group :test do gem "rspec-puppet-facts" gem "mocha" end + +group :system_tests do + gem 'beaker', :require => false + gem 'beaker-rspec', :require => false + gem 'beaker_spec_helper', :require => false + gem 'serverspec', :require => false +end -- cgit v1.2.3 From 9cd565f00ae8f6e10ad96c7c8ab2aa65d8fabe8a Mon Sep 17 00:00:00 2001 From: varac Date: Mon, 31 Oct 2016 13:46:05 +0100 Subject: Fix CI, dont install beaker on gitlab CI - Don't install `system-tests` gem group for rspec tests on CI - Use leapcode/ruby docker image because it has a more default ruby installation than the 'official' one. - Use `/var/cache/gitlab-runner/` as gem install path so we can cache this folder later --- Gemfile | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'Gemfile') diff --git a/Gemfile b/Gemfile index a2756c4..7ef1ec3 100644 --- a/Gemfile +++ b/Gemfile @@ -1,10 +1,8 @@ source "https://rubygems.org" -group :test do +group :development, :unit_tests do gem "rake" gem "rspec", '< 3.2.0' - gem "puppet", ENV['PUPPET_VERSION'] || ENV['GEM_PUPPET_VERSION'] || ENV['PUPPET_GEM_VERSION'] || '~> 3.7.0' - gem "facter", ENV['FACTER_VERSION'] || ENV['GEM_FACTER_VERSION'] || ENV['FACTER_GEM_VERSION'] || '~> 2.2.0' gem "rspec-puppet" gem "puppetlabs_spec_helper" gem "metadata-json-lint" @@ -13,8 +11,12 @@ group :test do end group :system_tests do - gem 'beaker', :require => false - gem 'beaker-rspec', :require => false - gem 'beaker_spec_helper', :require => false - gem 'serverspec', :require => false + gem 'beaker' + gem 'beaker-rspec' + gem 'beaker_spec_helper' + gem 'serverspec' end + +gem "puppet", ENV['PUPPET_VERSION'] || ENV['GEM_PUPPET_VERSION'] || ENV['PUPPET_GEM_VERSION'] || '~> 3.7.0' +gem "facter", ENV['FACTER_VERSION'] || ENV['GEM_FACTER_VERSION'] || ENV['FACTER_GEM_VERSION'] || '~> 2.2.0' + -- cgit v1.2.3 From 92e6aab93e081281d25ff69bdceb779943038b24 Mon Sep 17 00:00:00 2001 From: varac Date: Wed, 2 Nov 2016 22:47:30 +0100 Subject: Improve tests setup - Add .fixtures.yaml to checkout common module - Use puppetlabs-spec-helper in spec_helper.rb --- Gemfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Gemfile') diff --git a/Gemfile b/Gemfile index 7ef1ec3..44630f4 100644 --- a/Gemfile +++ b/Gemfile @@ -2,8 +2,8 @@ source "https://rubygems.org" group :development, :unit_tests do gem "rake" - gem "rspec", '< 3.2.0' - gem "rspec-puppet" + gem "rspec-puppet", "~> 2.1", :require => false + gem "rspec-core", "3.1.7", :require => false gem "puppetlabs_spec_helper" gem "metadata-json-lint" gem "rspec-puppet-facts" -- cgit v1.2.3