This repository has been archived by the owner on Jan 3, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Wait for CUPS to listen on port 631. Fixes #35
- Loading branch information
Showing
7 changed files
with
70 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,12 @@ | ||
--- | ||
fixtures: | ||
repositories: | ||
stdlib: # dependency of camptocamp-systemd | ||
repo: "https://github.com/puppetlabs/puppetlabs-stdlib" | ||
ref: "4.13.1" | ||
systemd: | ||
repo: "https://github.com/camptocamp/puppet-systemd" | ||
ref: "1.0.0" | ||
symlinks: | ||
cups: "#{source_dir}" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'spec_helper_acceptance' | ||
|
||
RSpec.describe 'Including class "cups"' do | ||
before(:all) do | ||
ensure_cups_is_running | ||
purge_all_queues | ||
end | ||
|
||
let(:manifest) { "include '::cups'" } | ||
|
||
describe 'restarting the CUPS server' do | ||
before(:all) do | ||
# Trigger a restart of the Class[cups::server::service] through Class[cups::server::config] | ||
shell('touch /etc/cups/lpoptions') | ||
end | ||
|
||
context 'when there are a lot of queues present' do | ||
before(:all) do | ||
names = (1..100).map { |n| "Queue#{n.to_s.rjust(3, '0')}" } | ||
|
||
# Increase RAM on virtual machine if this command runs suspiciously slow | ||
add_printers(*names) | ||
end | ||
|
||
it 'applies without error' do | ||
apply_manifest(manifest) | ||
end | ||
|
||
it 'is idempotent' do | ||
apply_manifest(manifest, catch_changes: true) | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
templates/systemd/wait_until_cups_listens_on_port_631.conf.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[Socket] | ||
ListenStream=[::1]:631 |