Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F8396476
expires_spec.rb
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
expires_spec.rb
View Options
# frozen_string_literal: true
require
'spec_helper'
describe
'apache::mod::expires'
,
type
:
:class
do
it_behaves_like
'a mod class, without including apache'
context
'with expires active'
,
:compile
do
include_examples
'Debian 11'
it
{
is_expected
.
to
contain_apache__mod
(
'expires'
)
}
it
{
is_expected
.
to
contain_file
(
'expires.conf'
)
.
with
(
content
:
%r{ExpiresActive On\n}
)
}
end
context
'with expires default'
,
:compile
do
let
:pre_condition
do
'class { apache: default_mods => false }'
end
let
:params
do
{
'expires_default'
=>
'access plus 1 month'
,
}
end
include_examples
'RedHat 7'
it
{
is_expected
.
to
contain_apache__mod
(
'expires'
)
}
it
{
is_expected
.
to
contain_file
(
'expires.conf'
)
.
with_content
(
"ExpiresActive On
\n
"
\
"ExpiresDefault
\"
access plus 1 month
\"\n
"
,
)
}
end
context
'with expires by type'
,
:compile
do
let
:pre_condition
do
'class { apache: default_mods => false }'
end
let
:params
do
{
'expires_by_type'
=>
[
{
'text/json'
=>
'mod plus 1 day'
},
{
'text/html'
=>
'access plus 1 year'
},
]
,
}
end
include_examples
'RedHat 7'
it
{
is_expected
.
to
contain_apache__mod
(
'expires'
)
}
it
{
is_expected
.
to
contain_file
(
'expires.conf'
)
.
with_content
(
"ExpiresActive On
\n
"
\
"ExpiresByType text/json
\"
mod plus 1 day
\"\n
"
\
"ExpiresByType text/html
\"
access plus 1 year
\"\n
"
,
)
}
end
end
File Metadata
Details
Attached
Mime Type
text/x-ruby
Expires
Jun 4 2025, 7:53 PM (13 w, 4 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3377236
Attached To
rSPAPA puppet-puppetlabs-apache
Event Timeline
Log In to Comment