Skip to content

Commit 9616b44

Browse files
treydockyorickps
andauthored
Updates - Including drop Debian 9 support (treydock#36)
* Updates - Including drop Debian 9 support PDK update Lots of lint fixes * Fix acceptance tests Address conflict with OS mod_auth_openidc Co-authored-by: Yorick Poels <[email protected]> --------- Co-authored-by: Yorick Poels <[email protected]>
1 parent 9cc89e7 commit 9616b44

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+301
-218
lines changed

.fixtures.yml

+15-8
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
11
fixtures:
2-
repositories:
3-
stdlib: https://github.com/puppetlabs/puppetlabs-stdlib.git
4-
epel: https://github.com/voxpupuli/puppet-epel.git
5-
apt: https://github.com/puppetlabs/puppetlabs-apt.git
6-
inifile: https://github.com/puppetlabs/puppetlabs-inifile.git
7-
firewall: https://github.com/puppetlabs/puppetlabs-firewall.git
8-
yumrepo_core: https://github.com/puppetlabs/puppetlabs-yumrepo_core.git
9-
python: https://github.com/voxpupuli/puppet-python.git
2+
forge_modules:
3+
stdlib:
4+
repo: puppetlabs/stdlib
5+
epel:
6+
repo: puppet/epel
7+
apt:
8+
repo: puppetlabs/apt
9+
inifile:
10+
repo: puppetlabs/inifile
11+
firewall:
12+
repo: puppetlabs/firewall
13+
yumrepo_core:
14+
repo: puppetlabs/yumrepo_core
15+
python:
16+
repo: puppet/python
1017
symlinks:
1118
globus: "#{source_dir}"

.github/workflows/ci.yaml

+7-12
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
- master
88
pull_request:
99

10+
1011
jobs:
1112
unit:
1213
runs-on: ubuntu-latest
@@ -15,11 +16,11 @@ jobs:
1516
fail-fast: false
1617
matrix:
1718
include:
18-
- ruby: 2.5.7
19+
- ruby: 2.5.9
1920
puppet: 6
2021
fixtures: .fixtures.yml
2122
allow_failure: false
22-
- ruby: 2.7.0
23+
- ruby: 2.7.6
2324
puppet: 7
2425
fixtures: .fixtures.yml
2526
allow_failure: false
@@ -36,6 +37,7 @@ jobs:
3637
with:
3738
ruby-version: ${{ matrix.ruby }}
3839
bundler-cache: true
40+
cache-version: 2
3941
bundler: '2.1.0'
4042
- name: Validate
4143
run: bundle exec rake check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop syntax lint metadata_lint
@@ -47,9 +49,8 @@ jobs:
4749
fail-fast: false
4850
matrix:
4951
set:
50-
- "centos-7"
51-
- "rocky-8"
52-
- "debian-9"
52+
- "el7"
53+
- "el8"
5354
- "debian-10"
5455
- "ubuntu-1804"
5556
- "ubuntu-2004"
@@ -65,19 +66,13 @@ jobs:
6566
run: |
6667
echo '{"ipv6":true,"fixed-cidr-v6":"2001:db8:1::/64"}' | sudo tee /etc/docker/daemon.json
6768
sudo service docker restart
68-
# https://github.com/actions/virtual-environments/issues/181#issuecomment-610874237
69-
- name: apparmor
70-
run: |
71-
set -x
72-
sudo apt-get remove mysql-server --purge
73-
sudo apt-get install apparmor-profiles
74-
sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld
7569
- uses: actions/checkout@v2
7670
- name: Setup ruby
7771
uses: ruby/setup-ruby@v1
7872
with:
7973
ruby-version: '2.7'
8074
bundler-cache: true
75+
cache-version: 2
8176
bundler: '2.1.0'
8277
- name: Run tests
8378
run: bundle exec rake beaker

.rubocop.yml

+14-25
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
---
22
require:
33
- rubocop-rspec
4-
- rubocop-i18n
54
AllCops:
65
DisplayCopNames: true
7-
TargetRubyVersion: '2.1'
6+
TargetRubyVersion: '2.5'
87
Include:
9-
- "./**/*.rb"
8+
- "**/*.rb"
109
Exclude:
1110
- bin/*
1211
- ".vendor/**/*"
@@ -21,13 +20,6 @@ AllCops:
2120
Metrics/LineLength:
2221
Description: People have wide screens, use them.
2322
Max: 200
24-
GetText:
25-
Enabled: false
26-
GetText/DecorateString:
27-
Description: We don't want to decorate test output.
28-
Exclude:
29-
- spec/**/*
30-
Enabled: false
3123
RSpec/BeforeAfterAll:
3224
Description: Beware of using after(:all) as it may cause state to leak between tests.
3325
A necessary evil in acceptance testing.
@@ -40,10 +32,6 @@ Style/BlockDelimiters:
4032
Description: Prefer braces for chaining. Mostly an aesthetical choice. Better to
4133
be consistent then.
4234
EnforcedStyle: braces_for_chaining
43-
Style/BracesAroundHashParameters:
44-
Description: Braces are required by Ruby 2.7. Cop removed from RuboCop v0.80.0.
45-
See https://github.com/rubocop-hq/rubocop/pull/7643
46-
Enabled: true
4735
Style/ClassAndModuleChildren:
4836
Description: Compact style reduces the required amount of indentation.
4937
EnforcedStyle: compact
@@ -72,13 +60,20 @@ Style/TrailingCommaInArguments:
7260
Description: Prefer always trailing comma on multiline argument lists. This makes
7361
diffs, and re-ordering nicer.
7462
EnforcedStyleForMultiline: comma
75-
Style/TrailingCommaInLiteral:
76-
Description: Prefer always trailing comma on multiline literals. This makes diffs,
77-
and re-ordering nicer.
78-
EnforcedStyleForMultiline: comma
7963
Style/SymbolArray:
8064
Description: Using percent style obscures symbolic intent of array's contents.
8165
EnforcedStyle: brackets
66+
RSpec/ImplicitSubject:
67+
Enabled: false
68+
Lint/BooleanSymbol:
69+
Enabled: false
70+
Naming/MethodParameterName:
71+
AllowedNames:
72+
- is
73+
RSpec/RepeatedExampleGroupBody:
74+
Enabled: false
75+
RSpec/RepeatedDescription:
76+
Enabled: false
8277
RSpec/MessageSpies:
8378
EnforcedStyle: receive
8479
Style/Documentation:
@@ -93,15 +88,9 @@ Style/MethodCalledOnDoEndBlock:
9388
Enabled: true
9489
Style/StringMethods:
9590
Enabled: true
96-
GetText/DecorateFunctionMessage:
97-
Enabled: false
98-
GetText/DecorateStringFormattingUsingInterpolation:
99-
Enabled: false
100-
GetText/DecorateStringFormattingUsingPercent:
101-
Enabled: false
10291
Layout/EndOfLine:
10392
Enabled: false
104-
Layout/IndentHeredoc:
93+
Layout/HeredocIndentation:
10594
Enabled: false
10695
Metrics/AbcSize:
10796
Enabled: false

.sync.yml

+18-4
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,34 @@
22
.github/workflows/ci.yaml:
33
acceptance_matrix:
44
set:
5-
- centos-7
6-
- rocky-8
7-
- debian-9
5+
- el7
6+
- el8
7+
- ---el9
88
- debian-10
99
- ubuntu-1804
1010
- ubuntu-2004
1111
puppet:
1212
- puppet6
1313
- puppet7
14+
.rubocop.yml:
15+
profiles:
16+
strict:
17+
configs:
18+
RSpec/RepeatedExampleGroupBody:
19+
Enabled: false
20+
RSpec/RepeatedDescription:
21+
Enabled: false
1422
.gitlab-ci.yml:
1523
delete: true
1624
appveyor.yml:
1725
delete: true
18-
spec/acceptance/nodesets/centos-7.yml:
26+
spec/acceptance/nodesets/el7.yml:
1927
extra_commands:
2028
- 'echo "LC_ALL=en_US.UTF-8" >> /etc/environment'
2129
- 'echo "LANG=en_US.UTF-8" > /etc/locale.conf'
30+
spec/acceptance/nodesets/el9.yml:
31+
delete: true
32+
spec/acceptance/nodesets/debian-11.yml:
33+
delete: true
34+
spec/acceptance/nodesets/ubuntu-2204.yml:
35+
delete: true

Gemfile

+9-17
Original file line numberDiff line numberDiff line change
@@ -17,30 +17,22 @@ ruby_version_segments = Gem::Version.new(RUBY_VERSION.dup).segments
1717
minor_version = ruby_version_segments[0..1].join('.')
1818

1919
group :development do
20-
gem "fast_gettext", '1.1.0', require: false if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.1.0')
21-
gem "fast_gettext", require: false if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.1.0')
22-
gem "json_pure", '<= 2.0.1', require: false if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.0.0')
23-
gem "json", '= 1.8.1', require: false if Gem::Version.new(RUBY_VERSION.dup) == Gem::Version.new('2.1.9')
24-
gem "json", '= 2.0.4', require: false if Gem::Requirement.create('~> 2.4.2').satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
25-
gem "json", '= 2.1.0', require: false if Gem::Requirement.create(['>= 2.5.0', '< 2.7.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
26-
gem "rb-readline", '= 0.5.5', require: false, platforms: [:mswin, :mingw, :x64_mingw]
27-
gem "puppet-module-posix-default-r#{minor_version}", '~> 0.4', require: false, platforms: [:ruby]
28-
gem "puppet-module-posix-dev-r#{minor_version}", '~> 0.4', require: false, platforms: [:ruby]
29-
gem "puppet-module-win-default-r#{minor_version}", '~> 0.4', require: false, platforms: [:mswin, :mingw, :x64_mingw]
30-
gem "puppet-module-win-dev-r#{minor_version}", '~> 0.4', require: false, platforms: [:mswin, :mingw, :x64_mingw]
31-
gem "puppet-lint-param-docs", require: false
32-
gem "github_changelog_generator", require: false
20+
gem "voxpupuli-test", '5.4.1', require: false
21+
gem "faraday", '~> 1.0', require: false
22+
gem "github_changelog_generator", require: false
23+
gem "puppet-blacksmith", require: false
24+
gem "puppet-strings", require: false
3325
end
3426
group :system_tests do
35-
gem "puppet-module-posix-system-r#{minor_version}", '~> 0.5', require: false, platforms: [:ruby]
36-
gem "puppet-module-win-system-r#{minor_version}", '~> 0.5', require: false, platforms: [:mswin, :mingw, :x64_mingw]
37-
gem "beaker", *location_for(ENV['BEAKER_VERSION'] || '~> 4.0')
27+
gem "beaker", *location_for(ENV['BEAKER_VERSION'] || '~> 4.29')
3828
gem "beaker-abs", *location_for(ENV['BEAKER_ABS_VERSION'] || '~> 0.1')
3929
gem "beaker-pe", require: false
4030
gem "beaker-hostgenerator"
4131
gem "beaker-rspec"
42-
gem "beaker-docker", *location_for(ENV['BEAKER_DOCKER_VERSION'] || '~> 0.7.0')
32+
gem "beaker-docker"
4333
gem "beaker-puppet"
34+
gem "beaker-puppet_install_helper", require: false
35+
gem "beaker-module_install_helper", require: false
4436
end
4537

4638
puppet_version = ENV['PUPPET_GEM_VERSION']

Rakefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# frozen_string_literal: true
22

3-
require 'puppet_litmus/rake_tasks' if Bundler.rubygems.find_name('puppet_litmus').any?
43
require 'puppetlabs_spec_helper/rake_tasks'
54
require 'puppet-syntax/tasks/puppet-syntax'
5+
require 'beaker-rspec/rake_task' if Bundler.rubygems.find_name('beaker-rspec').any?
66
require 'puppet_blacksmith/rake_tasks' if Bundler.rubygems.find_name('puppet-blacksmith').any?
77
require 'github_changelog_generator/task' if Bundler.rubygems.find_name('github_changelog_generator').any?
88
require 'puppet-strings/tasks' if Bundler.rubygems.find_name('puppet-strings').any?

lib/facter/globus_info.rb

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
require 'json'
24
require 'facter/util/globus'
35

lib/facter/globus_node_setup.rb

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
require 'facter/util/globus'
24

35
Facter.add('globus_node_setup') do

lib/facter/util/globus.rb

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
# Util class for Globus facts
24
class Facter::Util::Globus
35
def self.info
@@ -10,8 +12,10 @@ def self.info_exists?
1012

1113
def self.read_info
1214
return nil unless info_exists?
15+
1316
f = File.read(info)
1417
return nil if f.nil?
18+
1519
value = nil
1620
begin
1721
value = JSON.parse(f)

lib/puppet/functions/globus/endpoint_setup_args.rb

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
Puppet::Functions.create_function(:'globus::endpoint_setup_args') do
24
dispatch :args do
35
param 'Hash', :values

lib/puppet/functions/globus/node_setup_args.rb

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
Puppet::Functions.create_function(:'globus::node_setup_args') do
24
dispatch :args do
35
param 'Hash', :values

lib/puppet/provider/globus_connect_config/ini_setting.rb

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
Puppet::Type.type(:globus_connect_config).provide(
24
:ini_setting,
35
parent: Puppet::Type.type(:ini_setting).provider(:ruby),

lib/puppet/type/globus_connect_config.rb

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
Puppet::Type.newtype(:globus_connect_config) do
24
ensurable
35

@@ -47,16 +49,14 @@ def should_to_s(newvalue)
4749
end
4850

4951
validate do
50-
if self[:ensure] == :present
51-
if self[:value].nil?
52-
raise Puppet::Error, "Property value must be set for #{self[:name]} when ensure is present"
53-
end
52+
if self[:ensure] == :present && self[:value].nil?
53+
raise Puppet::Error, "Property value must be set for #{self[:name]} when ensure is present"
5454
end
5555
end
5656

5757
autorequire(:file) do
5858
[
59-
'/etc/globus-connect-server.conf',
59+
'/etc/globus-connect-server.conf'
6060
]
6161
end
6262
end

manifests/cli.pp

-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
Stdlib::Absolutepath $install_path = '/opt/globus-cli',
1515
Boolean $manage_python = true,
1616
) {
17-
1817
if $manage_python {
1918
include globus::python
2019
}

0 commit comments

Comments
 (0)