فهرست منبع

Fix tests to pass

- NB: Currently, we do not test for the inclusion of the
openldap::utils class when the provider is 'olc'.
DarkMorford 6 سال پیش
والد
کامیت
404c28fb2e
1فایلهای تغییر یافته به همراه9 افزوده شده و 1 حذف شده
  1. 9 1
      spec/classes/server/install_spec.rb

+ 9 - 1
spec/classes/server/install_spec.rb

@@ -4,8 +4,16 @@ describe 'openldap::server::install' do
   on_supported_os.each do |os, os_facts|
     context "on #{os}" do
       let(:facts) { os_facts }
+      let(:pre_condition) { "class {'openldap::server':}" }
 
-      it { is_expected.to compile }
+      it { is_expected.to compile.with_all_deps }
+
+      case os_facts[:osfamily]
+      when 'Debian'
+        it { is_expected.to contain_file('/var/cache/debconf/slapd.preseed') }
+      else
+        it { is_expected.not_to contain_file('/var/cache/debconf/slapd.preseed') }
+      end
     end
   end
 end