mirror of
https://github.com/voxpupuli/puppet-hashi_stack.git
synced 2025-05-24 19:05:01 +01:00
commit
a124b9cf9e
6 changed files with 19 additions and 10 deletions
|
@ -2,4 +2,4 @@
|
||||||
# Managed by modulesync - DO NOT EDIT
|
# Managed by modulesync - DO NOT EDIT
|
||||||
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/
|
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/
|
||||||
|
|
||||||
modulesync_config_version: '4.2.0'
|
modulesync_config_version: '5.0.0'
|
||||||
|
|
4
Gemfile
4
Gemfile
|
@ -4,7 +4,7 @@
|
||||||
source ENV['GEM_SOURCE'] || "https://rubygems.org"
|
source ENV['GEM_SOURCE'] || "https://rubygems.org"
|
||||||
|
|
||||||
group :test do
|
group :test do
|
||||||
gem 'voxpupuli-test', '~> 2.5', :require => false
|
gem 'voxpupuli-test', '~> 4.0', :require => false
|
||||||
gem 'coveralls', :require => false
|
gem 'coveralls', :require => false
|
||||||
gem 'simplecov-console', :require => false
|
gem 'simplecov-console', :require => false
|
||||||
gem 'puppet_metadata', '~> 1.0', :require => false
|
gem 'puppet_metadata', '~> 1.0', :require => false
|
||||||
|
@ -22,7 +22,7 @@ end
|
||||||
|
|
||||||
group :release do
|
group :release do
|
||||||
gem 'github_changelog_generator', '>= 1.16.1', :require => false if RUBY_VERSION >= '2.5'
|
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
|
gem 'puppet-strings', '>= 2.2', :require => false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require 'spec_helper_acceptance'
|
require 'spec_helper_acceptance'
|
||||||
|
|
||||||
describe 'hashi_stack::repo class' do
|
describe 'hashi_stack::repo class' do
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require 'spec_helper'
|
require 'spec_helper'
|
||||||
|
|
||||||
describe 'hashi_stack::repo' do
|
describe 'hashi_stack::repo' do
|
||||||
|
@ -5,15 +7,18 @@ describe 'hashi_stack::repo' do
|
||||||
context "on #{os}" do
|
context "on #{os}" do
|
||||||
let(:facts) { os_facts }
|
let(:facts) { os_facts }
|
||||||
|
|
||||||
|
it { is_expected.to compile.with_all_deps }
|
||||||
|
|
||||||
case os_facts[:os]['family']
|
case os_facts[:os]['family']
|
||||||
when 'Debian'
|
when 'Debian'
|
||||||
it { is_expected.to contain_apt__source('HashiCorp') }
|
it { is_expected.to contain_apt__source('HashiCorp') }
|
||||||
when 'RedHat'
|
when 'RedHat'
|
||||||
it {
|
it {
|
||||||
is_expected.to contain_yumrepo('HashiCorp').with(
|
expect(subject).to contain_yumrepo('HashiCorp').with(
|
||||||
baseurl: 'https://rpm.releases.hashicorp.com/RHEL/$releasever/$basearch/stable'
|
baseurl: 'https://rpm.releases.hashicorp.com/RHEL/$releasever/$basearch/stable'
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
context 'with custom Yum base url' do
|
context 'with custom Yum base url' do
|
||||||
let(:params) do
|
let(:params) do
|
||||||
{
|
{
|
||||||
|
@ -22,7 +27,7 @@ describe 'hashi_stack::repo' do
|
||||||
end
|
end
|
||||||
|
|
||||||
it {
|
it {
|
||||||
is_expected.to contain_yumrepo('HashiCorp').with(
|
expect(subject).to contain_yumrepo('HashiCorp').with(
|
||||||
baseurl: 'https://somewhere.else/RHEL/$releasever/$basearch/stable'
|
baseurl: 'https://somewhere.else/RHEL/$releasever/$basearch/stable'
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,17 +1,17 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
# Managed by modulesync - DO NOT EDIT
|
# Managed by modulesync - DO NOT EDIT
|
||||||
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/
|
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/
|
||||||
|
|
||||||
# puppetlabs_spec_helper will set up coverage if the env variable is set.
|
# 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.
|
# 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'
|
require 'voxpupuli/test/spec_helper'
|
||||||
|
|
||||||
if File.exist?(File.join(__dir__, 'default_module_facts.yml'))
|
if File.exist?(File.join(__dir__, 'default_module_facts.yml'))
|
||||||
facts = YAML.safe_load(File.read(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|
|
||||||
facts.each do |name, value|
|
add_custom_fact name.to_sym, value
|
||||||
add_custom_fact name.to_sym, value
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
# This file is completely managed via modulesync
|
# This file is completely managed via modulesync
|
||||||
require 'voxpupuli/acceptance/spec_helper_acceptance'
|
require 'voxpupuli/acceptance/spec_helper_acceptance'
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue