Skip to content

Commit

Permalink
pdk convert + tests
Browse files Browse the repository at this point in the history
  • Loading branch information
alvagante committed Sep 24, 2024
1 parent ccdd609 commit 11094fd
Show file tree
Hide file tree
Showing 81 changed files with 780 additions and 312 deletions.
2 changes: 0 additions & 2 deletions .puppet-lint.rc
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
--relative
--no-parameter_documentation
--no-params_empty_string
8 changes: 8 additions & 0 deletions .sync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# This file can be used to customize the files managed by PDK.
#
# See https://github.com/puppetlabs/pdk-templates/blob/main/README.md
# for more information.
#
# See https://github.com/puppetlabs/pdk-templates/blob/main/config_defaults.yml
# for the default values.
--- {}
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Changelog

All notable changes to this project will be documented in this file.

## Release 3.0.0

**Features**

**Bugfixes**

**Known Issues**
1 change: 1 addition & 0 deletions data/common.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--- {}
21 changes: 21 additions & 0 deletions hiera.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
version: 5

defaults: # Used for any hierarchy level that omits these keys.
datadir: data # This path is relative to hiera.yaml's directory.
data_hash: yaml_data # Use the built-in YAML backend.

hierarchy:
- name: "osfamily/major release"
paths:
# Used to distinguish between Debian and Ubuntu
- "os/%{facts.os.name}/%{facts.os.release.major}.yaml"
- "os/%{facts.os.family}/%{facts.os.release.major}.yaml"
# Used for Solaris
- "os/%{facts.os.family}/%{facts.kernelrelease}.yaml"
- name: "osfamily"
paths:
- "os/%{facts.os.name}.yaml"
- "os/%{facts.os.family}.yaml"
- name: 'common'
path: 'common.yaml'
2 changes: 1 addition & 1 deletion manifests/check.pp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
String $hostwide = 'no',

Check warning on line 18 in manifests/check.pp

View workflow job for this annotation

GitHub Actions / Syntax validation

missing documentation for defined type parameter puppi::check::hostwide (check: parameter_documentation)

Check warning on line 18 in manifests/check.pp

View workflow job for this annotation

GitHub Actions / Syntax validation

missing documentation for defined type parameter puppi::check::hostwide (check: parameter_documentation)
Variant[String,Integer] $priority = '50',

Check warning on line 19 in manifests/check.pp

View workflow job for this annotation

GitHub Actions / Syntax validation

missing documentation for defined type parameter puppi::check::priority (check: parameter_documentation)

Check warning on line 19 in manifests/check.pp

View workflow job for this annotation

GitHub Actions / Syntax validation

missing documentation for defined type parameter puppi::check::priority (check: parameter_documentation)
String $project = 'default',

Check warning on line 20 in manifests/check.pp

View workflow job for this annotation

GitHub Actions / Syntax validation

missing documentation for defined type parameter puppi::check::project (check: parameter_documentation)
Boolean $enable = true,
Variant[Boolean,String] $enable = true,

Check warning on line 21 in manifests/check.pp

View workflow job for this annotation

GitHub Actions / Syntax validation

missing documentation for defined type parameter puppi::check::enable (check: parameter_documentation)
) {
require puppi
require puppi::params
Expand Down
2 changes: 1 addition & 1 deletion manifests/configure.pp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
String $arguments = '',
Variant[String,Integer] $priority = '50',
String $user = 'root',
Boolean $enable = true,
Variant[Boolean,String] $enable = true,
) {
require puppi
require puppi::params
Expand Down
2 changes: 1 addition & 1 deletion manifests/deploy.pp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
String $arguments = '',
Variant[String,Integer] $priority = '50',
String $user = 'root',
Boolean $enable = true,
Variant[Boolean,String] $enable = true,
) {
require puppi
require puppi::params
Expand Down
2 changes: 1 addition & 1 deletion manifests/initialize.pp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
String $arguments = '',
Variant[String,Integer] $priority = '50',
String $user = 'root',
Boolean $enable = true,
Variant[Boolean,String] $enable = true,
) {
require puppi
require puppi::params
Expand Down
2 changes: 1 addition & 1 deletion manifests/project.pp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
Optional[String] $source_baseurl = undef,
String $document_root = '',
Optional[String] $config_root = undef,
Boolean $enable = true,
Variant[Boolean,String] $enable = true,
) {
require puppi::params

Expand Down
2 changes: 1 addition & 1 deletion manifests/project/archive.pp
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
Boolean $run_checks = true,
Boolean $always_deploy = true,
Boolean $auto_deploy = false,
Boolean $enable = true,
Variant[Boolean,String] $enable = true,
) {
require puppi
require puppi::params
Expand Down
2 changes: 1 addition & 1 deletion manifests/project/builder.pp
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@
Boolean $run_checks = true,
Boolean $always_deploy = true,
Boolean $auto_deploy = false,
Boolean $enable = true,
Variant[Boolean,String] $enable = true,
) {
require puppi
require puppi::params
Expand Down
2 changes: 1 addition & 1 deletion manifests/project/dir.pp
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@
Boolean $run_checks = true,
Boolean $skip_predeploy = false,
Boolean $auto_deploy = false,
Boolean $enable = true,
Variant[Boolean,String] $enable = true,
) {
require puppi
require puppi::params
Expand Down
2 changes: 1 addition & 1 deletion manifests/project/files.pp
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@
Variant[String,Integer] $backup_retention = '5',
Boolean $run_checks = true,
Boolean $auto_deploy = false,
Boolean $enable = true,
Variant[Boolean,String] $enable = true,
) {
require puppi
require puppi::params
Expand Down
2 changes: 1 addition & 1 deletion manifests/project/git.pp
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@
Variant[String,Integer] $backup_retention = '5',
Boolean $run_checks = true,
Boolean $auto_deploy = false,
Boolean $enable = true,
Variant[Boolean,String] $enable = true,
) {
require puppi
require puppi::params
Expand Down
2 changes: 1 addition & 1 deletion manifests/project/hg.pp
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
Variant[String,Integer] $backup_retention = '5',
Boolean $run_checks = true,
Boolean $auto_deploy = false,
Boolean $enable = true,
Variant[Boolean,String] $enable = true,
) {
require puppi
require puppi::params
Expand Down
2 changes: 1 addition & 1 deletion manifests/project/maven.pp
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@
Boolean $always_deploy = true,
Boolean $check_deploy = true,
Boolean $auto_deploy = false,
Boolean $enable = true,
Variant[Boolean,String] $enable = true,
) {
require puppi
require puppi::params
Expand Down
2 changes: 1 addition & 1 deletion manifests/project/mysql.pp
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
Boolean $run_checks = true,
Boolean $always_deploy = true,
Boolean $auto_deploy = false,
Boolean $enable = true,
Variant[Boolean,String] $enable = true,
) {
require puppi
require puppi::params
Expand Down
2 changes: 1 addition & 1 deletion manifests/project/service.pp
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
String $report_email = '',
Boolean $run_checks = true,
Boolean $auto_deploy = false,
Boolean $enable = true,
Variant[Boolean,String] $enable = true,
) {
require puppi
require puppi::params
Expand Down
2 changes: 1 addition & 1 deletion manifests/project/svn.pp
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@
Variant[String,Integer] $backup_retention = '5',
Boolean $run_checks = true,
Boolean $auto_deploy = false,
Boolean $enable = true,
Variant[Boolean,String] $enable = true,
) {
require puppi
require puppi::params
Expand Down
2 changes: 1 addition & 1 deletion manifests/project/tar.pp
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@
Boolean $always_deploy = true,
Boolean $auto_deploy = false,
Boolean $verify_ssl = true,
Boolean $enable = true,
Variant[Boolean,String] $enable = true,
) {
require puppi
require puppi::params
Expand Down
2 changes: 1 addition & 1 deletion manifests/project/war.pp
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@
Boolean $always_deploy = true,
Boolean $check_deploy = true,
Boolean $auto_deploy = false,
Boolean $enable = true,
Variant[Boolean,String] $enable = true,
) {
require puppi
require puppi::params
Expand Down
2 changes: 1 addition & 1 deletion manifests/project/y4maven.pp
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@
Boolean $always_deploy = true,
Boolean $check_deploy = true,
Boolean $auto_deploy = false,
Boolean $enable = true,
Variant[Boolean,String] $enable = true,
) {
require puppi
require puppi::params
Expand Down
2 changes: 1 addition & 1 deletion manifests/project/yum.pp
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
Boolean $checks_required = false,
Boolean $always_deploy = true,
Boolean $auto_deploy = false,
Boolean $enable = true,
Variant[Boolean,String] $enable = true,
) {
require puppi
require puppi::params
Expand Down
2 changes: 1 addition & 1 deletion manifests/report.pp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
String $arguments = '',
Variant[String,Integer] $priority = '50',
String $user = 'root',
Boolean $enable = true,
Variant[Boolean,String] $enable = true,
) {
require puppi::params

Expand Down
2 changes: 1 addition & 1 deletion manifests/rollback.pp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
String $arguments = '',
Variant[String,Integer] $priority = '50',
String $user = 'root',
Boolean $enable = true,
Variant[Boolean,String] $enable = true,
) {
require puppi
require puppi::params
Expand Down
13 changes: 13 additions & 0 deletions spec/classes/dependencies_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# frozen_string_literal: true

require 'spec_helper'

describe 'puppi::dependencies' do
on_supported_os.each do |os, os_facts|
context "on #{os}" do
let(:facts) { os_facts }

it { is_expected.to compile.with_all_deps }
end
end
end
13 changes: 13 additions & 0 deletions spec/classes/extras_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# frozen_string_literal: true

require 'spec_helper'

describe 'puppi::extras' do
on_supported_os.each do |os, os_facts|
context "on #{os}" do
let(:facts) { os_facts }

it { is_expected.to compile.with_all_deps }

Check failure on line 10 in spec/classes/extras_spec.rb

View workflow job for this annotation

GitHub Actions / Unit tests

puppi::extras on redhat-7-x86_64 is expected to compile into a catalogue without dependency cycles Failure/Error: it { is_expected.to compile.with_all_deps } error during compilation: Evaluation Error: Unknown variable: 'puppi::params::ntp'. (file: /__w/puppi/puppi/spec/fixtures/modules/puppi/manifests/extras.pp, line: 13, column: 33) on node 7228dc2e7195.v003jhcb0gbebhi3eudo0jipka.bx.internal.cloudapp.net

Check failure on line 10 in spec/classes/extras_spec.rb

View workflow job for this annotation

GitHub Actions / Unit tests

puppi::extras on redhat-8-x86_64 is expected to compile into a catalogue without dependency cycles Failure/Error: it { is_expected.to compile.with_all_deps } error during compilation: Evaluation Error: Unknown variable: 'puppi::params::ntp'. (file: /__w/puppi/puppi/spec/fixtures/modules/puppi/manifests/extras.pp, line: 13, column: 33) on node 7228dc2e7195.v003jhcb0gbebhi3eudo0jipka.bx.internal.cloudapp.net

Check failure on line 10 in spec/classes/extras_spec.rb

View workflow job for this annotation

GitHub Actions / Unit tests

puppi::extras on redhat-9-x86_64 is expected to compile into a catalogue without dependency cycles Failure/Error: it { is_expected.to compile.with_all_deps } error during compilation: Evaluation Error: Unknown variable: 'puppi::params::ntp'. (file: /__w/puppi/puppi/spec/fixtures/modules/puppi/manifests/extras.pp, line: 13, column: 33) on node 7228dc2e7195.v003jhcb0gbebhi3eudo0jipka.bx.internal.cloudapp.net

Check failure on line 10 in spec/classes/extras_spec.rb

View workflow job for this annotation

GitHub Actions / Unit tests

puppi::extras on centos-7-x86_64 is expected to compile into a catalogue without dependency cycles Failure/Error: it { is_expected.to compile.with_all_deps } error during compilation: Evaluation Error: Unknown variable: 'puppi::params::ntp'. (file: /__w/puppi/puppi/spec/fixtures/modules/puppi/manifests/extras.pp, line: 13, column: 33) on node 7228dc2e7195.v003jhcb0gbebhi3eudo0jipka.bx.internal.cloudapp.net

Check failure on line 10 in spec/classes/extras_spec.rb

View workflow job for this annotation

GitHub Actions / Unit tests

puppi::extras on centos-8-x86_64 is expected to compile into a catalogue without dependency cycles Failure/Error: it { is_expected.to compile.with_all_deps } error during compilation: Evaluation Error: Unknown variable: 'puppi::params::ntp'. (file: /__w/puppi/puppi/spec/fixtures/modules/puppi/manifests/extras.pp, line: 13, column: 33) on node 7228dc2e7195.v003jhcb0gbebhi3eudo0jipka.bx.internal.cloudapp.net

Check failure on line 10 in spec/classes/extras_spec.rb

View workflow job for this annotation

GitHub Actions / Unit tests

puppi::extras on oraclelinux-7-x86_64 is expected to compile into a catalogue without dependency cycles Failure/Error: it { is_expected.to compile.with_all_deps } error during compilation: Evaluation Error: Unknown variable: 'puppi::params::ntp'. (file: /__w/puppi/puppi/spec/fixtures/modules/puppi/manifests/extras.pp, line: 13, column: 33) on node 7228dc2e7195.v003jhcb0gbebhi3eudo0jipka.bx.internal.cloudapp.net

Check failure on line 10 in spec/classes/extras_spec.rb

View workflow job for this annotation

GitHub Actions / Unit tests

puppi::extras on oraclelinux-8-x86_64 is expected to compile into a catalogue without dependency cycles Failure/Error: it { is_expected.to compile.with_all_deps } error during compilation: Evaluation Error: Unknown variable: 'puppi::params::ntp'. (file: /__w/puppi/puppi/spec/fixtures/modules/puppi/manifests/extras.pp, line: 13, column: 33) on node 7228dc2e7195.v003jhcb0gbebhi3eudo0jipka.bx.internal.cloudapp.net

Check failure on line 10 in spec/classes/extras_spec.rb

View workflow job for this annotation

GitHub Actions / Unit tests

puppi::extras on oraclelinux-9-x86_64 is expected to compile into a catalogue without dependency cycles Failure/Error: it { is_expected.to compile.with_all_deps } error during compilation: Evaluation Error: Unknown variable: 'puppi::params::ntp'. (file: /__w/puppi/puppi/spec/fixtures/modules/puppi/manifests/extras.pp, line: 13, column: 33) on node 7228dc2e7195.v003jhcb0gbebhi3eudo0jipka.bx.internal.cloudapp.net

Check failure on line 10 in spec/classes/extras_spec.rb

View workflow job for this annotation

GitHub Actions / Unit tests

puppi::extras on sles-12-x86_64 is expected to compile into a catalogue without dependency cycles Failure/Error: it { is_expected.to compile.with_all_deps } error during compilation: Evaluation Error: Unknown variable: 'puppi::params::ntp'. (file: /__w/puppi/puppi/spec/fixtures/modules/puppi/manifests/extras.pp, line: 13, column: 33) on node 7228dc2e7195.v003jhcb0gbebhi3eudo0jipka.bx.internal.cloudapp.net

Check failure on line 10 in spec/classes/extras_spec.rb

View workflow job for this annotation

GitHub Actions / Unit tests

puppi::extras on debian-11-x86_64 is expected to compile into a catalogue without dependency cycles Failure/Error: it { is_expected.to compile.with_all_deps } error during compilation: Evaluation Error: Unknown variable: 'puppi::params::ntp'. (file: /__w/puppi/puppi/spec/fixtures/modules/puppi/manifests/extras.pp, line: 13, column: 33) on node 7228dc2e7195.v003jhcb0gbebhi3eudo0jipka.bx.internal.cloudapp.net

Check failure on line 10 in spec/classes/extras_spec.rb

View workflow job for this annotation

GitHub Actions / Unit tests

puppi::extras on redhat-7-x86_64 is expected to compile into a catalogue without dependency cycles Failure/Error: it { is_expected.to compile.with_all_deps } error during compilation: Evaluation Error: Unknown variable: 'puppi::params::ntp'. (file: /__w/puppi/puppi/spec/fixtures/modules/puppi/manifests/extras.pp, line: 13, column: 33) on node 7228dc2e7195.v003jhcb0gbebhi3eudo0jipka.bx.internal.cloudapp.net

Check failure on line 10 in spec/classes/extras_spec.rb

View workflow job for this annotation

GitHub Actions / Unit tests

puppi::extras on redhat-8-x86_64 is expected to compile into a catalogue without dependency cycles Failure/Error: it { is_expected.to compile.with_all_deps } error during compilation: Evaluation Error: Unknown variable: 'puppi::params::ntp'. (file: /__w/puppi/puppi/spec/fixtures/modules/puppi/manifests/extras.pp, line: 13, column: 33) on node 7228dc2e7195.v003jhcb0gbebhi3eudo0jipka.bx.internal.cloudapp.net

Check failure on line 10 in spec/classes/extras_spec.rb

View workflow job for this annotation

GitHub Actions / Unit tests

puppi::extras on redhat-9-x86_64 is expected to compile into a catalogue without dependency cycles Failure/Error: it { is_expected.to compile.with_all_deps } error during compilation: Evaluation Error: Unknown variable: 'puppi::params::ntp'. (file: /__w/puppi/puppi/spec/fixtures/modules/puppi/manifests/extras.pp, line: 13, column: 33) on node 7228dc2e7195.v003jhcb0gbebhi3eudo0jipka.bx.internal.cloudapp.net

Check failure on line 10 in spec/classes/extras_spec.rb

View workflow job for this annotation

GitHub Actions / Unit tests

puppi::extras on centos-7-x86_64 is expected to compile into a catalogue without dependency cycles Failure/Error: it { is_expected.to compile.with_all_deps } error during compilation: Evaluation Error: Unknown variable: 'puppi::params::ntp'. (file: /__w/puppi/puppi/spec/fixtures/modules/puppi/manifests/extras.pp, line: 13, column: 33) on node 7228dc2e7195.v003jhcb0gbebhi3eudo0jipka.bx.internal.cloudapp.net

Check failure on line 10 in spec/classes/extras_spec.rb

View workflow job for this annotation

GitHub Actions / Unit tests

puppi::extras on centos-8-x86_64 is expected to compile into a catalogue without dependency cycles Failure/Error: it { is_expected.to compile.with_all_deps } error during compilation: Evaluation Error: Unknown variable: 'puppi::params::ntp'. (file: /__w/puppi/puppi/spec/fixtures/modules/puppi/manifests/extras.pp, line: 13, column: 33) on node 7228dc2e7195.v003jhcb0gbebhi3eudo0jipka.bx.internal.cloudapp.net

Check failure on line 10 in spec/classes/extras_spec.rb

View workflow job for this annotation

GitHub Actions / Unit tests

puppi::extras on oraclelinux-7-x86_64 is expected to compile into a catalogue without dependency cycles Failure/Error: it { is_expected.to compile.with_all_deps } error during compilation: Evaluation Error: Unknown variable: 'puppi::params::ntp'. (file: /__w/puppi/puppi/spec/fixtures/modules/puppi/manifests/extras.pp, line: 13, column: 33) on node 7228dc2e7195.v003jhcb0gbebhi3eudo0jipka.bx.internal.cloudapp.net

Check failure on line 10 in spec/classes/extras_spec.rb

View workflow job for this annotation

GitHub Actions / Unit tests

puppi::extras on oraclelinux-8-x86_64 is expected to compile into a catalogue without dependency cycles Failure/Error: it { is_expected.to compile.with_all_deps } error during compilation: Evaluation Error: Unknown variable: 'puppi::params::ntp'. (file: /__w/puppi/puppi/spec/fixtures/modules/puppi/manifests/extras.pp, line: 13, column: 33) on node 7228dc2e7195.v003jhcb0gbebhi3eudo0jipka.bx.internal.cloudapp.net

Check failure on line 10 in spec/classes/extras_spec.rb

View workflow job for this annotation

GitHub Actions / Unit tests

puppi::extras on oraclelinux-9-x86_64 is expected to compile into a catalogue without dependency cycles Failure/Error: it { is_expected.to compile.with_all_deps } error during compilation: Evaluation Error: Unknown variable: 'puppi::params::ntp'. (file: /__w/puppi/puppi/spec/fixtures/modules/puppi/manifests/extras.pp, line: 13, column: 33) on node 7228dc2e7195.v003jhcb0gbebhi3eudo0jipka.bx.internal.cloudapp.net

Check failure on line 10 in spec/classes/extras_spec.rb

View workflow job for this annotation

GitHub Actions / Unit tests

puppi::extras on sles-12-x86_64 is expected to compile into a catalogue without dependency cycles Failure/Error: it { is_expected.to compile.with_all_deps } error during compilation: Evaluation Error: Unknown variable: 'puppi::params::ntp'. (file: /__w/puppi/puppi/spec/fixtures/modules/puppi/manifests/extras.pp, line: 13, column: 33) on node 7228dc2e7195.v003jhcb0gbebhi3eudo0jipka.bx.internal.cloudapp.net

Check failure on line 10 in spec/classes/extras_spec.rb

View workflow job for this annotation

GitHub Actions / Unit tests

puppi::extras on debian-11-x86_64 is expected to compile into a catalogue without dependency cycles Failure/Error: it { is_expected.to compile.with_all_deps } error during compilation: Evaluation Error: Unknown variable: 'puppi::params::ntp'. (file: /__w/puppi/puppi/spec/fixtures/modules/puppi/manifests/extras.pp, line: 13, column: 33) on node 7228dc2e7195.v003jhcb0gbebhi3eudo0jipka.bx.internal.cloudapp.net
end
end
end
13 changes: 13 additions & 0 deletions spec/classes/helpers_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# frozen_string_literal: true

require 'spec_helper'

describe 'puppi::helpers' do
on_supported_os.each do |os, os_facts|
context "on #{os}" do
let(:facts) { os_facts }

it { is_expected.to compile.with_all_deps }
end
end
end
13 changes: 13 additions & 0 deletions spec/classes/mcollective/client_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# frozen_string_literal: true

require 'spec_helper'

describe 'puppi::mcollective::client' do
on_supported_os.each do |os, os_facts|
context "on #{os}" do
let(:facts) { os_facts }

it { is_expected.to compile.with_all_deps }
end
end
end
13 changes: 13 additions & 0 deletions spec/classes/mcollective/server_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# frozen_string_literal: true

require 'spec_helper'

describe 'puppi::mcollective::server' do
on_supported_os.each do |os, os_facts|
context "on #{os}" do
let(:facts) { os_facts }

it { is_expected.to compile.with_all_deps }
end
end
end
13 changes: 13 additions & 0 deletions spec/classes/one_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# frozen_string_literal: true

require 'spec_helper'

describe 'puppi::one' do
on_supported_os.each do |os, os_facts|
context "on #{os}" do
let(:facts) { os_facts }

it { is_expected.to compile.with_all_deps }
end
end
end
13 changes: 13 additions & 0 deletions spec/classes/params_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# frozen_string_literal: true

require 'spec_helper'

describe 'puppi::params' do
on_supported_os.each do |os, os_facts|
context "on #{os}" do
let(:facts) { os_facts }

it { is_expected.to compile.with_all_deps }
end
end
end
18 changes: 7 additions & 11 deletions spec/classes/puppi_spec.rb
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
# frozen_string_literal: true

require 'spec_helper'

describe 'puppi' do
on_supported_os.each do |os, os_facts|
context "on #{os}" do
let(:facts) { os_facts }

let(:node) { 'rspec.example42.com' }
let(:node) { 'rspec.example42.com' }
let(:facts) { { :ipaddress => '10.42.42.42' } }

describe 'Test standard installation' do
it { should contain_file('puppi').with_ensure('present') }
it { should contain_file('puppi.conf').with_ensure('present') }
it { should contain_file('puppi.scripts').with_ensure('present') }
it { should contain_file('puppi_basedir').with_ensure('directory') }
it { should contain_file('puppi_datadir').with_ensure('directory') }
it { is_expected.to compile.with_all_deps }
end
end

end
13 changes: 13 additions & 0 deletions spec/classes/skel_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# frozen_string_literal: true

require 'spec_helper'

describe 'puppi::skel' do
on_supported_os.each do |os, os_facts|
context "on #{os}" do
let(:facts) { os_facts }

it { is_expected.to compile.with_all_deps }
end
end
end
13 changes: 13 additions & 0 deletions spec/classes/two_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# frozen_string_literal: true

require 'spec_helper'

describe 'puppi::two' do
on_supported_os.each do |os, os_facts|
context "on #{os}" do
let(:facts) { os_facts }

it { is_expected.to compile.with_all_deps }
end
end
end
Loading

0 comments on commit 11094fd

Please sign in to comment.