diff --git a/.fixtures.yml b/.fixtures.yml index 73c6493f..f0a14617 100644 --- a/.fixtures.yml +++ b/.fixtures.yml @@ -1,6 +1,8 @@ fixtures: repositories: - stdlib: "https://github.com/puppetlabs/puppetlabs-stdlib.git" + stdlib: + repo: "https://github.com/puppetlabs/puppetlabs-stdlib.git" + puppet_version: "< 9.0.0" concat: "https://github.com/puppetlabs/puppetlabs-concat.git" augeasproviders_core: "https://github.com/voxpupuli/puppet-augeasproviders_core.git" augeasproviders_shellvar: "https://github.com/voxpupuli/puppet-augeasproviders_shellvar.git" @@ -11,5 +13,6 @@ fixtures: repo: "https://github.com/puppetlabs/puppetlabs-mount_core.git" puppet_version: ">= 6.0.0" transition: "https://github.com/puppetlabs/puppetlabs-transition.git" + filepath: "https://github.com/EdgeJ/puppet-filepath.git" symlinks: "nfs": "#{source_dir}" diff --git a/.github/workflows/test-suite.yaml b/.github/workflows/test-suite.yaml index 0dec901b..fb665d08 100644 --- a/.github/workflows/test-suite.yaml +++ b/.github/workflows/test-suite.yaml @@ -11,11 +11,11 @@ jobs: strategy: fail-fast: false matrix: - puppet: [7.22.0] - ruby: [2.7.7, 3.0.5, 3.1.3] + puppet: [7.0.0, 8.2.0] + ruby: [3.1.3, 3.2.0] - name: Static code analysis - runs-on: ubuntu-20.04 + name: Static code analysis new + runs-on: ubuntu-latest permissions: contents: read @@ -50,58 +50,17 @@ jobs: run: | PUPPET_VERSION=${{ matrix.puppet }} bundle exec rake rubocop - test-static-old: - strategy: - fail-fast: false - matrix: - puppet: [5.5.22, 6.29.0] - ruby: [2.5.9, 2.6.9] - - name: Static code analysis - runs-on: ubuntu-20.04 - permissions: - contents: read - - steps: - - uses: actions/checkout@v3 - - - name: Set up Ruby - uses: ruby/setup-ruby@v1 - with: - ruby-version: ${{ matrix.ruby }} - bundler-cache: true - env: - PUPPET_VERSION: ${{ matrix.puppet }} - - - name: Run metadata lint - run: | - PUPPET_VERSION=${{ matrix.puppet }} bundle exec rake metadata_lint - - - name: Run puppet lint - run: | - PUPPET_VERSION=${{ matrix.puppet }} bundle exec rake lint - - - name: Run puppet syntax check - run: | - PUPPET_VERSION=${{ matrix.puppet }} bundle exec rake syntax - - - name: Run puppet rspec tests - run: | - PUPPET_VERSION=${{ matrix.puppet }} STRICT_VARIABLES=yes bundle exec rake spec - - - name: Run rubocop tests - run: | - PUPPET_VERSION=${{ matrix.puppet }} bundle exec rake rubocop test-integration: + if: false strategy: fail-fast: false matrix: - puppet: [puppet6, puppet7] + puppet: [7.0.0, 8.0.0] beakerset: [ubuntu-18.04, ubuntu-20.04, ubuntu-22.04, centos-7, debian-10, debian-11] name: Integration tests - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest permissions: contents: read @@ -111,7 +70,7 @@ jobs: - name: Set up Ruby uses: ruby/setup-ruby@v1 with: - ruby-version: 2.6.9 + ruby-version: 2.7 bundler-cache: true env: BEAKER_set: ${{ matrix.beakerset }} @@ -125,3 +84,4 @@ jobs: BEAKER_set: ${{ matrix.beakerset }} BEAKER_PUPPET_COLLECTION: ${{ matrix.puppet }} PUPPET_INSTALL_TYPE: agent + diff --git a/.rubocop.yml b/.rubocop.yml index 3456f542..c5eaddae 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -571,4 +571,7 @@ Style/MixinUsage: Enabled: false EmptyExampleGroup: - Enabled: false \ No newline at end of file + Enabled: false + +inherit_gem: + voxpupuli-test: rubocop.yml diff --git a/Gemfile b/Gemfile index e7652ea2..c14ddaed 100644 --- a/Gemfile +++ b/Gemfile @@ -13,14 +13,14 @@ end group :test do gem 'metadata-json-lint', require: false gem 'puppet-blacksmith', require: false, git: 'https://github.com/voxpupuli/puppet-blacksmith.git' - gem 'puppet-lint', require: false, git: 'https://github.com/rodjek/puppet-lint.git' - gem 'puppet-lint-absolute_classname-check', require: false - gem 'puppet-lint-classes_and_types_beginning_with_digits-check', require: false - gem 'puppet-lint-leading_zero-check', require: false - gem 'puppet-lint-trailing_comma-check', require: false - gem 'puppet-lint-unquoted_string-check', require: false - gem 'puppet-lint-variable_contains_upcase', require: false - gem 'puppet-lint-version_comparison-check', require: false +# gem 'puppet-lint', require: false, git: 'https://github.com/rodjek/puppet-lint.git' +# gem 'puppet-lint-absolute_classname-check', require: false +# gem 'puppet-lint-classes_and_types_beginning_with_digits-check', require: false +# gem 'puppet-lint-leading_zero-check', require: false +# gem 'puppet-lint-trailing_comma-check', require: false +# gem 'puppet-lint-unquoted_string-check', require: false +# gem 'puppet-lint-variable_contains_upcase', require: false +# gem 'puppet-lint-version_comparison-check', require: false gem 'puppet-strings', require: false gem 'puppet-syntax', require: false gem 'puppetlabs_spec_helper', require: false @@ -58,5 +58,7 @@ end puppetversion = ENV['PUPPET_VERSION'].nil? ? '~> 4.0' : ENV['PUPPET_VERSION'].to_s gem 'puppet', puppetversion, require: false, groups: [:test] +gem 'voxpupuli-test' +gem 'voxpupuli-acceptance' # vim:ft=ruby diff --git a/Rakefile b/Rakefile index 9622eb83..d1d32e38 100644 --- a/Rakefile +++ b/Rakefile @@ -4,6 +4,7 @@ require 'puppet-syntax/tasks/puppet-syntax' require 'metadata-json-lint/rake_task' require 'puppet_blacksmith/rake_tasks' require 'voxpupuli/release/rake_tasks' +require 'voxpupuli/test/rake_tasks' require 'rubocop/rake_task' require 'puppet-strings/tasks' diff --git a/manifests/functions/create_export.pp b/manifests/functions/create_export.pp index 4ba5f740..585fa10c 100644 --- a/manifests/functions/create_export.pp +++ b/manifests/functions/create_export.pp @@ -51,10 +51,10 @@ unless defined(File[$name]) { filepath { $name: - ensure => present, - owner => $owner, - group => $group, - mode => $mode, + ensure => present, + owner => $owner, + group => $group, + mode => $mode, } } } diff --git a/metadata.json b/metadata.json index 45031166..2d86c29d 100644 --- a/metadata.json +++ b/metadata.json @@ -8,7 +8,7 @@ "project_page": "https://github.com/derdanne/puppet-nfs", "issues_url": "https://github.com/derdanne/puppet-nfs/issues", "dependencies": [ - {"name":"puppetlabs/stdlib","version_requirement":">= 4.5.0 < 9.0.0"}, + {"name":"puppetlabs/stdlib","version_requirement":">= 7.0.0 < 8.0.0"}, {"name":"puppetlabs/concat","version_requirement":">= 1.1.2 < 8.0.0"}, {"name":"puppetlabs/transition","version_requirement":">= 0.1.0 < 2.0.0"}, {"name":"puppet/augeasproviders_core","version_requirement":">= 2.1.5 < 4.0.0"}, diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 69df60b9..56bd5434 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -5,6 +5,7 @@ end require 'puppetlabs_spec_helper/module_spec_helper' +require 'voxpupuli/test/spec_helper' require 'rspec-puppet-facts' include RspecPuppetFacts diff --git a/spec/spec_helper_acceptance.rb b/spec/spec_helper_acceptance.rb index a3c60c2e..83e6d3dd 100644 --- a/spec/spec_helper_acceptance.rb +++ b/spec/spec_helper_acceptance.rb @@ -1,4 +1,7 @@ # frozen_string_literal: true +require 'voxpupuli/acceptance/spec_helper_acceptance' + +configure_beaker RSpec.configure do |c| c.mock_with :rspec