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] 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