From 142499bb4ee64b8795833a2a0f0c09cc5c023bf5 Mon Sep 17 00:00:00 2001 From: Thomas Equeter Date: Tue, 25 Feb 2020 19:25:43 +0100 Subject: [PATCH] Reproduce issue #251 --- .../classes/cups_purge_unmanaged_queues_spec.rb | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 spec/acceptance/classes/cups_purge_unmanaged_queues_spec.rb diff --git a/spec/acceptance/classes/cups_purge_unmanaged_queues_spec.rb b/spec/acceptance/classes/cups_purge_unmanaged_queues_spec.rb new file mode 100644 index 00000000..c1a3b546 --- /dev/null +++ b/spec/acceptance/classes/cups_purge_unmanaged_queues_spec.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +require 'spec_helper_acceptance' + +RSpec.describe 'Including class "cups" with purge_unmanaged_queues' do + context 'when the Cups service is not running' do + before(:all) do + apply_manifest('class { "cups": service_ensure => "stopped" }', catch_failures: true) + end + + it 'does not produce errors' do + apply_manifest('class { "cups": purge_unmanaged_queues => true }', catch_failures: true) do + assert_not_match(/ipptool: Unable to connect to/, stderr) + end + end + end +end