diff --git a/.travis.yml b/.travis.yml index 7fd97158..a76b1f61 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,10 +10,10 @@ before_install: matrix: fast_finish: true include: - - rvm: 2.3.1 + - rvm: 2.4.0 bundler_args: --without system_tests - env: PUPPET_GEM_VERSION="~> 4.0" - - rvm: 2.1.7 + env: PUPPET_GEM_VERSION="~> 5.0" + - rvm: 2.1.9 bundler_args: --without system_tests env: PUPPET_GEM_VERSION="~> 4.0" notifications: diff --git a/Gemfile b/Gemfile index 92bc924a..96e95ae7 100644 --- a/Gemfile +++ b/Gemfile @@ -60,9 +60,9 @@ group :system_tests do gem "beaker-pe", :require => false gem "beaker-rspec", *location_for(ENV['BEAKER_RSPEC_VERSION']) gem "beaker-hostgenerator", *location_for(ENV['BEAKER_HOSTGENERATOR_VERSION']) - gem "beaker-abs", *location_for(ENV['BEAKER_ABS_VERSION'] || '~> 0.1') + gem "beaker-abs", *location_for(ENV['BEAKER_ABS_VERSION'] || '~> 0.1') gem "beaker-testmode_switcher", '<= 0.2.0', :require => false - gem 'master_manipulator', :require => false + gem "master_manipulator", :require => false end gem 'puppet', *location_for(ENV['PUPPET_GEM_VERSION']) diff --git a/appveyor.yml b/appveyor.yml index 39ca16e4..7e05880b 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -14,14 +14,28 @@ environment: RUBY_VER: 21 - PUPPET_GEM_VERSION: ~> 4.0 RUBY_VER: 21-x64 - - PUPPET_GEM_VERSION: ~> 4.0 - RUBY_VER: 23 - - PUPPET_GEM_VERSION: ~> 4.0 - RUBY_VER: 23-x64 + - PUPPET_GEM_VERSION: ~> 5.0 + RUBY_VER: 24 + - PUPPET_GEM_VERSION: ~> 5.0 + RUBY_VER: 24-x64 + - PUPPET_GEM_VERSION: 4.7.1 + RUBY_VER: 21-x64 matrix: fast_finish: true install: - SET PATH=C:\Ruby%RUBY_VER%\bin;%PATH% +- ps: | + # AppVeyor appears to have OpenSSL headers available already + # which msys2 would normally install with: + # pacman -S mingw-w64-x86_64-openssl --noconfirm + # + if ( $(ruby --version) -match "^ruby\s+2\.4" ) { + Write-Output "Building OpenSSL gem ~> 2.0.4 to fix Ruby 2.4 / AppVeyor issue" + gem install openssl --version '~> 2.0.4' --no-ri --no-rdoc + } + + gem list openssl + ruby -ropenssl -e 'puts \"OpenSSL Version - #{OpenSSL::OPENSSL_VERSION}\"; puts \"OpenSSL Library Version - #{OpenSSL::OPENSSL_LIBRARY_VERSION}\"' - bundle install --jobs 4 --retry 2 --without system_tests - type Gemfile.lock build: off diff --git a/spec/defines/database_spec.rb b/spec/defines/database_spec.rb index 7695d20e..6a370c91 100644 --- a/spec/defines/database_spec.rb +++ b/spec/defines/database_spec.rb @@ -9,14 +9,14 @@ :db_name => 'myTestDb', :instance => 'MSSQLSERVER', } } - end - - describe 'Minimal Params' do let(:pre_condition) { <<-EOF define sqlserver::config{} sqlserver::config {'MSSQLSERVER': } EOF } + end + + describe 'Minimal Params' do it_behaves_like 'compile' end diff --git a/spec/defines/login/permissions_spec.rb b/spec/defines/login/permissions_spec.rb index f4fbfe7b..306fa017 100644 --- a/spec/defines/login/permissions_spec.rb +++ b/spec/defines/login/permissions_spec.rb @@ -3,6 +3,11 @@ describe 'sqlserver::login::permissions' do let(:facts) { {:osfamily => 'windows'} } + let(:pre_condition) { <<-EOF + define sqlserver::config{} + sqlserver::config {'MSSQLSERVER': } + EOF + } context 'validation errors' do include_context 'manifests' do let(:title) { 'myTitle' } diff --git a/spec/defines/login_spec.rb b/spec/defines/login_spec.rb index 56c49206..be15539d 100644 --- a/spec/defines/login_spec.rb +++ b/spec/defines/login_spec.rb @@ -9,6 +9,11 @@ :login => 'myTitle', :instance => 'MSSQLSERVER', } } + let(:pre_condition) { <<-EOF + define sqlserver::config{} + sqlserver::config {'MSSQLSERVER': } + EOF + } end describe 'Minimal Params' do diff --git a/spec/defines/sp_configure_spec.rb b/spec/defines/sp_configure_spec.rb index 10e45631..af5be7a1 100644 --- a/spec/defines/sp_configure_spec.rb +++ b/spec/defines/sp_configure_spec.rb @@ -9,6 +9,11 @@ :config_name => 'filestream access level', :value => 1, } } + let(:pre_condition) { <<-EOF + define sqlserver::config{} + sqlserver::config {'MSSQLSERVER': } + EOF + } end describe 'basic usage' do let(:should_contain_command) { [ diff --git a/spec/defines/user/permissions_spec.rb b/spec/defines/user/permissions_spec.rb index 18852705..e0e066ae 100644 --- a/spec/defines/user/permissions_spec.rb +++ b/spec/defines/user/permissions_spec.rb @@ -3,6 +3,12 @@ describe 'sqlserver::user::permissions' do let(:facts) { {:osfamily => 'windows'} } + let(:pre_condition) { <<-EOF + define sqlserver::config{} + sqlserver::config {'MSSQLSERVER': } + EOF + } + context 'validation errors' do include_context 'manifests' do let(:title) { 'myTitle' } diff --git a/spec/defines/user_spec.rb b/spec/defines/user_spec.rb index 9ae3b7ac..c8b236a5 100644 --- a/spec/defines/user_spec.rb +++ b/spec/defines/user_spec.rb @@ -6,6 +6,11 @@ let(:title) { 'loggingUser' } let(:sqlserver_tsql_title) { 'user-MSSQLSERVER-myDatabase-loggingUser' } let(:params) { {:user => 'loggingUser', :database => 'myDatabase'} } + let(:pre_condition) { <<-EOF + define sqlserver::config{} + sqlserver::config {'MSSQLSERVER': } + EOF + } end describe 'should fail when password above 128 characters' do