Skip to content

Commit

Permalink
Merge pull request #32 from voxpupuli/modulesync
Browse files Browse the repository at this point in the history
modulesync 5.0.0
  • Loading branch information
bastelfreak authored Oct 31, 2021
2 parents 990777e + 82fac30 commit 57539ed
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .msync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down
2 changes: 2 additions & 0 deletions spec/acceptance/agent_and_server_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require 'spec_helper_acceptance'

describe 'hyperglass::server class' do
Expand Down
2 changes: 2 additions & 0 deletions spec/acceptance/agent_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require 'spec_helper_acceptance'

describe 'hyperglass::agent class' do
Expand Down
11 changes: 4 additions & 7 deletions spec/acceptance/server_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require 'spec_helper_acceptance'

describe 'hyperglass::server class' do
Expand All @@ -16,20 +18,15 @@
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

# 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
Expand Down
4 changes: 3 additions & 1 deletion spec/classes/hyperglass_agent_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require 'spec_helper'

describe 'hyperglass::agent' do
Expand All @@ -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
Expand Down
4 changes: 3 additions & 1 deletion spec/classes/hyperglass_server_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require 'spec_helper'

describe 'hyperglass::server' do
Expand All @@ -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'
Expand Down
10 changes: 5 additions & 5 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -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
2 changes: 2 additions & 0 deletions spec/spec_helper_acceptance.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

Expand Down

0 comments on commit 57539ed

Please sign in to comment.