diff --git a/.msync.yml b/.msync.yml index 43966c2..e1cd81c 100644 --- a/.msync.yml +++ b/.msync.yml @@ -2,4 +2,4 @@ # Managed by modulesync - DO NOT EDIT # https://voxpupuli.org/docs/updating-files-managed-with-modulesync/ -modulesync_config_version: '4.2.0' +modulesync_config_version: '5.0.0' diff --git a/Gemfile b/Gemfile index e43173e..2b731b9 100644 --- a/Gemfile +++ b/Gemfile @@ -4,7 +4,7 @@ source ENV['GEM_SOURCE'] || "https://rubygems.org" group :test do - gem 'voxpupuli-test', '~> 2.5', :require => false + gem 'voxpupuli-test', '~> 4.0', :require => false gem 'coveralls', :require => false gem 'simplecov-console', :require => false gem 'puppet_metadata', '~> 1.0', :require => false @@ -22,7 +22,7 @@ end group :release do gem 'github_changelog_generator', '>= 1.16.1', :require => false if RUBY_VERSION >= '2.5' - gem 'voxpupuli-release', '>= 1.0.2', :require => false + gem 'voxpupuli-release', '>= 1.2.0', :require => false gem 'puppet-strings', '>= 2.2', :require => false end diff --git a/spec/acceptance/agent_and_server_spec.rb b/spec/acceptance/agent_and_server_spec.rb index 37ba6d5..9ee513b 100644 --- a/spec/acceptance/agent_and_server_spec.rb +++ b/spec/acceptance/agent_and_server_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper_acceptance' describe 'hyperglass::server class' do diff --git a/spec/acceptance/agent_spec.rb b/spec/acceptance/agent_spec.rb index 9903ea8..7f0c7bc 100644 --- a/spec/acceptance/agent_spec.rb +++ b/spec/acceptance/agent_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper_acceptance' describe 'hyperglass::agent class' do diff --git a/spec/acceptance/server_spec.rb b/spec/acceptance/server_spec.rb index b22a03c..43b1720 100644 --- a/spec/acceptance/server_spec.rb +++ b/spec/acceptance/server_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper_acceptance' describe 'hyperglass::server class' do @@ -16,12 +18,7 @@ apply_manifest(pp, catch_changes: true) end - describe service('hyperglass') do - it { is_expected.to be_running } - it { is_expected.to be_enabled } - end - - describe service('nginx') do + describe service('hyperglass') && service('nginx') do it { is_expected.to be_running } it { is_expected.to be_enabled } end @@ -29,7 +26,7 @@ # This sleeps because hyperglass can take a long time to start. The service # check above returns successfully as the service is running though it has # not even bound to a port. - describe command('sleep 150; curl http://localhost:8001') do + describe command('sleep 180; curl http://localhost:8001') do its(:stdout) { is_expected.to match %r{hyperglass} } end end diff --git a/spec/classes/hyperglass_agent_spec.rb b/spec/classes/hyperglass_agent_spec.rb index 18dccb3..568d7fc 100644 --- a/spec/classes/hyperglass_agent_spec.rb +++ b/spec/classes/hyperglass_agent_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe 'hyperglass::agent' do @@ -6,7 +8,7 @@ end on_supported_os.each do |os, facts| - context "on #{os} " do + context "on #{os}" do let :facts do facts end diff --git a/spec/classes/hyperglass_server_spec.rb b/spec/classes/hyperglass_server_spec.rb index 7f0e678..ffeffa8 100644 --- a/spec/classes/hyperglass_server_spec.rb +++ b/spec/classes/hyperglass_server_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe 'hyperglass::server' do @@ -6,7 +8,7 @@ end on_supported_os.each do |os, facts| - context "on #{os} " do + context "on #{os}" do let :facts do facts.merge( python3_version: '3.6.8' diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index fb5f0cb..4d617f3 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,17 +1,17 @@ +# frozen_string_literal: true + # Managed by modulesync - DO NOT EDIT # https://voxpupuli.org/docs/updating-files-managed-with-modulesync/ # puppetlabs_spec_helper will set up coverage if the env variable is set. # We want to do this if lib exists and it hasn't been explicitly set. -ENV['COVERAGE'] ||= 'yes' if Dir.exist?(File.expand_path('../../lib', __FILE__)) +ENV['COVERAGE'] ||= 'yes' if Dir.exist?(File.expand_path('../lib', __dir__)) require 'voxpupuli/test/spec_helper' if File.exist?(File.join(__dir__, 'default_module_facts.yml')) facts = YAML.safe_load(File.read(File.join(__dir__, 'default_module_facts.yml'))) - if facts - facts.each do |name, value| - add_custom_fact name.to_sym, value - end + facts&.each do |name, value| + add_custom_fact name.to_sym, value end end diff --git a/spec/spec_helper_acceptance.rb b/spec/spec_helper_acceptance.rb index d3b906b..d3a6e23 100644 --- a/spec/spec_helper_acceptance.rb +++ b/spec/spec_helper_acceptance.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Managed by modulesync - DO NOT EDIT # https://voxpupuli.org/docs/updating-files-managed-with-modulesync/