From 329af79502c415050599ceca103d4a6b964804cc Mon Sep 17 00:00:00 2001 From: cruelsmith <92088441+cruelsmith@users.noreply.github.com> Date: Tue, 24 Sep 2024 16:01:00 +0200 Subject: [PATCH 1/2] Revert "fix acceptance tests on Rocky/RHEL 8" This reverts commit 897a16e4ac862185dec1f0286ab1a5c91b2a784e. --- manifests/install.pp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/manifests/install.pp b/manifests/install.pp index 3e14d10..33902a2 100644 --- a/manifests/install.pp +++ b/manifests/install.pp @@ -3,10 +3,6 @@ class proftpd::install { assert_private() - if $facts['os']['family'] == 'RedHat' { - Yumrepo <| |> -> Package <| |> - } - if $proftpd::package_manage { package { $proftpd::packages: ensure => $proftpd::package_ensure, From 82673af66221ac130e55194ee6b66cf41a3e958d Mon Sep 17 00:00:00 2001 From: cruelsmith <92088441+cruelsmith@users.noreply.github.com> Date: Tue, 24 Sep 2024 21:21:29 +0200 Subject: [PATCH 2/2] ensure needed order for RedHat acceptance tests * use contain instead of class calls to inherit depencies to subclasses closes #45 --- manifests/init.pp | 7 ++++--- spec/acceptance/proftpd_spec.rb | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index 38051f4..5980c65 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -140,9 +140,10 @@ Optional[Stdlib::Filesource] $authgroupfile_source = undef, Optional[Stdlib::Absolutepath] $prefix = undef, ) { - class { 'proftpd::install': } - -> class { 'proftpd::config': } - ~> class { 'proftpd::service': } + contain proftpd::install + contain proftpd::config + contain proftpd::service + Class['proftpd::install'] -> Class['proftpd::config'] ~> Class['proftpd::service'] if $load_modules { create_resources(proftpd::module, $load_modules, {}) diff --git a/spec/acceptance/proftpd_spec.rb b/spec/acceptance/proftpd_spec.rb index 051e019..cc7a62a 100644 --- a/spec/acceptance/proftpd_spec.rb +++ b/spec/acceptance/proftpd_spec.rb @@ -6,6 +6,7 @@ pp = <<-EOS if $facts['os']['family'] == 'RedHat' { include epel + Class['epel'] -> Class['proftpd'] } class { 'proftpd': } EOS