rubocop: autofix

This commit is contained in:
Tim 2021-10-31 19:04:38 +01:00
parent d920244e2f
commit 41decd6cee
No known key found for this signature in database
GPG key ID: 04D659E6BF1C4CC0
4 changed files with 16 additions and 7 deletions

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper_acceptance'
describe 'hashi_stack::repo class' do

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe 'hashi_stack::repo' do
@ -5,15 +7,18 @@ describe 'hashi_stack::repo' do
context "on #{os}" do
let(:facts) { os_facts }
it { is_expected.to compile.with_all_deps }
case os_facts[:os]['family']
when 'Debian'
it { is_expected.to contain_apt__source('HashiCorp') }
when 'RedHat'
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'
)
}
context 'with custom Yum base url' do
let(:params) do
{
@ -22,7 +27,7 @@ describe 'hashi_stack::repo' do
end
it {
is_expected.to contain_yumrepo('HashiCorp').with(
expect(subject).to contain_yumrepo('HashiCorp').with(
baseurl: 'https://somewhere.else/RHEL/$releasever/$basearch/stable'
)
}

View file

@ -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|
facts&.each do |name, value|
add_custom_fact name.to_sym, value
end
end
end

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
# This file is completely managed via modulesync
require 'voxpupuli/acceptance/spec_helper_acceptance'