|
15 | 15 | :is_pe => false,
|
16 | 16 | }
|
17 | 17 | end
|
| 18 | + |
| 19 | + let(:params) { |
| 20 | + { |
| 21 | + :cache_ignore_headers => "Set-Cookie", |
| 22 | + } |
| 23 | + } |
| 24 | + |
18 | 25 | context "with Apache version < 2.4" do
|
19 | 26 | let :pre_condition do
|
20 | 27 | 'class{ "apache":
|
|
26 | 33 | it { should compile }
|
27 | 34 | it { should contain_class('apache::mod::disk_cache') }
|
28 | 35 | it { is_expected.to contain_apache__mod("disk_cache") }
|
29 |
| - it { is_expected.to contain_file("disk_cache.conf").with(:content => /CacheEnable disk \/\nCacheRoot \"\/var\/cache\/apache2\/mod_disk_cache\"\nCacheDirLevels 2\nCacheDirLength 1/) } |
| 36 | + it { is_expected.to contain_file("disk_cache.conf").with(:content => /CacheEnable disk \/\nCacheRoot \"\/var\/cache\/apache2\/mod_disk_cache\"\nCacheDirLevels 2\nCacheDirLength 1\nCacheIgnoreHeaders Set-Cookie/) } |
30 | 37 | end
|
31 | 38 | context "with Apache version >= 2.4" do
|
32 | 39 | let :pre_condition do
|
|
40 | 47 | it { should contain_class('apache::mod::disk_cache') }
|
41 | 48 | it { should contain_class('apache::mod::cache').that_comes_before('Class[Apache::Mod::Disk_cache]') }
|
42 | 49 | it { is_expected.to contain_apache__mod("cache_disk") }
|
43 |
| - it { is_expected.to contain_file("disk_cache.conf").with(:content => /CacheEnable disk \/\nCacheRoot \"\/var\/cache\/apache2\/mod_cache_disk\"\nCacheDirLevels 2\nCacheDirLength 1/) } |
| 50 | + it { is_expected.to contain_file("disk_cache.conf").with(:content => /CacheEnable disk \/\nCacheRoot \"\/var\/cache\/apache2\/mod_cache_disk\"\nCacheDirLevels 2\nCacheDirLength 1\nCacheIgnoreHeaders Set-Cookie/) } |
44 | 51 | end
|
45 | 52 | end
|
46 | 53 |
|
|
57 | 64 | :is_pe => false,
|
58 | 65 | }
|
59 | 66 | end
|
| 67 | + |
| 68 | + let(:params) { |
| 69 | + { |
| 70 | + :cache_ignore_headers => "Set-Cookie", |
| 71 | + } |
| 72 | + } |
| 73 | + |
60 | 74 | context "with Apache version < 2.4" do
|
61 | 75 | let :pre_condition do
|
62 | 76 | 'class{ "apache":
|
|
66 | 80 | }'
|
67 | 81 | end
|
68 | 82 | it { is_expected.to contain_apache__mod("disk_cache") }
|
69 |
| - it { is_expected.to contain_file("disk_cache.conf").with(:content => /CacheEnable disk \/\nCacheRoot \"\/var\/cache\/mod_proxy\"\nCacheDirLevels 2\nCacheDirLength 1/) } |
| 83 | + it { is_expected.to contain_file("disk_cache.conf").with(:content => /CacheEnable disk \/\nCacheRoot \"\/var\/cache\/mod_proxy\"\nCacheDirLevels 2\nCacheDirLength 1\nCacheIgnoreHeaders Set-Cookie/) } |
70 | 84 | end
|
71 | 85 | context "with Apache version >= 2.4" do
|
72 | 86 | let :pre_condition do
|
|
77 | 91 | }'
|
78 | 92 | end
|
79 | 93 | it { is_expected.to contain_apache__mod("cache_disk") }
|
80 |
| - it { is_expected.to contain_file("disk_cache.conf").with(:content => /CacheEnable disk \/\nCacheRoot \"\/var\/cache\/httpd\/proxy\"\nCacheDirLevels 2\nCacheDirLength 1/) } |
| 94 | + it { is_expected.to contain_file("disk_cache.conf").with(:content => /CacheEnable disk \/\nCacheRoot \"\/var\/cache\/httpd\/proxy\"\nCacheDirLevels 2\nCacheDirLength 1\nCacheIgnoreHeaders Set-Cookie/) } |
81 | 95 | end
|
82 | 96 | end
|
83 | 97 | context "on a FreeBSD OS" do
|
|
93 | 107 | :is_pe => false,
|
94 | 108 | }
|
95 | 109 | end
|
| 110 | + |
| 111 | + let(:params) { |
| 112 | + { |
| 113 | + :cache_ignore_headers => "Set-Cookie", |
| 114 | + } |
| 115 | + } |
| 116 | + |
96 | 117 | context "with Apache version < 2.4" do
|
97 | 118 | let :pre_condition do
|
98 | 119 | 'class{ "apache":
|
|
105 | 126 | it { should contain_class('apache::mod::disk_cache') }
|
106 | 127 | it { should contain_class('apache::mod::cache').that_comes_before('Class[Apache::Mod::Disk_cache]') }
|
107 | 128 | it { is_expected.to contain_apache__mod("disk_cache") }
|
108 |
| - it { is_expected.to contain_file("disk_cache.conf").with(:content => /CacheEnable disk \/\nCacheRoot \"\/var\/cache\/mod_disk_cache\"\nCacheDirLevels 2\nCacheDirLength 1/) } |
| 129 | + it { is_expected.to contain_file("disk_cache.conf").with(:content => /CacheEnable disk \/\nCacheRoot \"\/var\/cache\/mod_disk_cache\"\nCacheDirLevels 2\nCacheDirLength 1\nCacheIgnoreHeaders Set-Cookie/) } |
109 | 130 | end
|
110 | 131 | context "with Apache version >= 2.4" do
|
111 | 132 | let :pre_condition do
|
|
119 | 140 | it { should contain_class('apache::mod::disk_cache') }
|
120 | 141 | it { should contain_class('apache::mod::cache').that_comes_before('Class[Apache::Mod::Disk_cache]') }
|
121 | 142 | it { is_expected.to contain_apache__mod("cache_disk") }
|
122 |
| - it { is_expected.to contain_file("disk_cache.conf").with(:content => /CacheEnable disk \/\nCacheRoot \"\/var\/cache\/mod_cache_disk\"\nCacheDirLevels 2\nCacheDirLength 1/) } |
| 143 | + it { is_expected.to contain_file("disk_cache.conf").with(:content => /CacheEnable disk \/\nCacheRoot \"\/var\/cache\/mod_cache_disk\"\nCacheDirLevels 2\nCacheDirLength 1\nCacheIgnoreHeaders Set-Cookie/) } |
123 | 144 | end
|
124 | 145 | end
|
125 | 146 | end
|
0 commit comments