Skip to content
This repository has been archived by the owner on Apr 19, 2024. It is now read-only.

Collection of refactors #98

Open
wants to merge 25 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
a6d6c9d
Convert to PDK v3.0.0
Sep 4, 2023
6f8ae23
Use https for fixtures
Sep 4, 2023
de36de1
Re-activate hiera for module unit tests
Sep 4, 2023
6e086c6
Use mocking with mocha
Sep 4, 2023
3f22818
Satisfy rubocop
Sep 4, 2023
c5afd6c
Satisfy puppet-lint
Sep 5, 2023
cd64b4e
Add Github actions to test/validate with Puppet 7/8
Sep 6, 2023
1524acc
Add comment regarding swapfile_sizes_csv
Oct 25, 2023
93bb72d
Merge pull request #1 from Phil-Friderici/pdk
Phil-Friderici Oct 30, 2023
b86f39f
Remove support for Ubunut 10.04 because it fails
Oct 31, 2023
48d6e16
Refactor unit tests to be more complete and strict
Oct 31, 2023
9deaee6
Merge pull request #2 from Phil-Friderici/unittests
Phil-Friderici Nov 7, 2023
77cf948
Use stricter parameter validations
Oct 30, 2023
41dc65a
Set resource attributes explicitly instead of amending them
Nov 7, 2023
dd0ab2b
readability: add linebreaks
Nov 7, 2023
d64d330
readability: remove unnecessary brackets
Nov 7, 2023
51248bc
readability: refactor if-clause
Nov 8, 2023
e6e41ef
readability: remove unnecessary handling of stringified boolean
Nov 8, 2023
47490c4
remove unnecessary validation
Nov 8, 2023
f761b80
refactor: use else instead of elsif
Nov 8, 2023
382fe8f
readability: add more comments
Nov 8, 2023
a635232
readability: use metaparameter instead of chaining arrow
Nov 8, 2023
294aa32
refactor: use plain Puppet code instead deprecated has_key()
Nov 8, 2023
8c1068d
Use latest stdlib while unit testing
Nov 8, 2023
db87a05
Let puppetlabs_spec_helper create the symlink for testing
Nov 8, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions .fixtures.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
fixtures:
repositories:
stdlib:
repo: "git://github.com/puppetlabs/puppetlabs-stdlib.git"
ref: 4.23.0
repo: "https://github.com/puppetlabs/puppetlabs-stdlib.git"
augeasproviders_sysctl:
repo: "git://github.com/hercules-team/augeasproviders_sysctl.git"
repo: "https://github.com/hercules-team/augeasproviders_sysctl.git"
augeasproviders_core:
repo: "git://github.com/hercules-team/augeasproviders_core.git"
repo: "https://github.com/hercules-team/augeasproviders_core.git"
mount_core:
repo: "git://github.com/puppetlabs/puppetlabs-mount_core.git"
symlinks:
swap_file: "#{source_dir}"
repo: "https://github.com/puppetlabs/puppetlabs-mount_core.git"
5 changes: 5 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*.rb eol=lf
*.erb eol=lf
*.pp eol=lf
*.sh eol=lf
*.epp eol=lf
34 changes: 34 additions & 0 deletions .github/workflows/run-pdk-tests-on-puppet-7.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Run PDK tests on Puppet 7.x

on:
- push
- pull_request

jobs:
validate-7:
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v2

- name: Run pdk validate
uses: puppets-epic-show-theatre/action-pdk-validate@v1
with:
puppet-version: "7"
# [optional] A string indicating the Puppet version to validate against, such as "5.4.2" or "5.5".
# pe-version: ""
# [optional] A string indicating the PE version to validate against, such as "2017.3.5" or "2018.1".

test-7:
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v2

- name: Run unit tests
uses: puppets-epic-show-theatre/action-pdk-test-unit@v1
with:
puppet-version: "7"
# [optional] A string indicating the Puppet version to validate against, such as "5.4.2" or "5.5".
# pe-version: ""
# [optional] A string indicating the PE version to validate against, such as "2017.3.5" or "2018.1".
34 changes: 34 additions & 0 deletions .github/workflows/run-pdk-tests-on-puppet-8.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Run PDK tests on Puppet 8.x

on:
- push
- pull_request

jobs:
validate-8:
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v2

- name: Run pdk validate
uses: puppets-epic-show-theatre/action-pdk-validate@v1
with:
puppet-version: "8"
# [optional] A string indicating the Puppet version to validate against, such as "5.4.2" or "5.5".
# pe-version: ""
# [optional] A string indicating the PE version to validate against, such as "2017.3.5" or "2018.1".

test-8:
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v2

- name: Run unit tests
uses: puppets-epic-show-theatre/action-pdk-test-unit@v1
with:
puppet-version: "8"
# [optional] A string indicating the Puppet version to validate against, such as "5.4.2" or "5.5".
# pe-version: ""
# [optional] A string indicating the PE version to validate against, such as "2017.3.5" or "2018.1".
42 changes: 28 additions & 14 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,28 @@
.*.sw?
pkg
.rspec_system
.vagrant/
log/
junit/
.yar*
doc/

# Puppet
coverage/
spec/fixtures/modules/*
spec/fixtures/manifests/*
Gemfile.lock
.git/
.*.sw[op]
.metadata
.yardoc
.yardwarns
*.iml
/.bundle/
/.idea/
/.vagrant/
/coverage/
/bin/
/doc/
/Gemfile.local
/Gemfile.lock
/junit/
/log/
/pkg/
/spec/fixtures/manifests/
/spec/fixtures/modules/*
/tmp/
/vendor/
/convert_report.txt
/update_report.txt
.DS_Store
.project
.envrc
/inventory.yaml
/spec/fixtures/litmus_inventory.yaml
43 changes: 43 additions & 0 deletions .pdkignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
.git/
.*.sw[op]
.metadata
.yardoc
.yardwarns
*.iml
/.bundle/
/.idea/
/.vagrant/
/coverage/
/bin/
/doc/
/Gemfile.local
/Gemfile.lock
/junit/
/log/
/pkg/
/spec/fixtures/manifests/
/spec/fixtures/modules/*
/tmp/
/vendor/
/convert_report.txt
/update_report.txt
.DS_Store
.project
.envrc
/inventory.yaml
/spec/fixtures/litmus_inventory.yaml
/.fixtures.yml
/Gemfile
/.gitattributes
/.gitignore
/.pdkignore
/.puppet-lint.rc
/Rakefile
/rakelib/
/.rspec
/..yml
/.yardopts
/spec/
/.vscode/
/.sync.yml
/.devcontainer/
1 change: 1 addition & 0 deletions .puppet-lint.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--relative
2 changes: 1 addition & 1 deletion .rspec
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
--format documentation
--color
--format documentation
Loading