|
35 | 35 | 'group' => 'root', |
36 | 36 | 'mode' => '0644') |
37 | 37 | end |
38 | | - it { is_expected.to contain_concat__fragment("#{title}-header").with_content(%r{access_log\s+/var/log/nginx/www\.rspec\.example\.com\.access\.log combined;}) } |
| 38 | + it { is_expected.to contain_concat__fragment("#{title}-header").with_content(%r{access_log\s+/var/log/nginx/www\.rspec\.example\.com\.access\.log;}) } |
39 | 39 | it { is_expected.to contain_concat__fragment("#{title}-header").with_content(%r{error_log\s+/var/log/nginx/www\.rspec\.example\.com\.error\.log}) } |
40 | 40 | it { is_expected.to contain_concat__fragment("#{title}-footer") } |
41 | 41 | it { is_expected.to contain_nginx__resource__location("#{title}-default") } |
|
294 | 294 | title: 'should set access_log', |
295 | 295 | attr: 'access_log', |
296 | 296 | value: '/path/to/access.log', |
297 | | - match: ' access_log /path/to/access.log combined;' |
| 297 | + match: ' access_log /path/to/access.log;' |
298 | 298 | }, |
299 | 299 | { |
300 | 300 | title: 'should set multiple access_log directives', |
301 | 301 | attr: 'access_log', |
302 | 302 | value: ['/path/to/log/1', 'syslog:server=localhost'], |
303 | 303 | match: [ |
304 | | - ' access_log /path/to/log/1 combined;', |
305 | | - ' access_log syslog:server=localhost combined;' |
| 304 | + ' access_log /path/to/log/1;', |
| 305 | + ' access_log syslog:server=localhost;' |
306 | 306 | ] |
307 | 307 | }, |
308 | 308 | { |
|
315 | 315 | title: 'should set access_log to syslog', |
316 | 316 | attr: 'access_log', |
317 | 317 | value: 'syslog:server=localhost', |
318 | | - match: ' access_log syslog:server=localhost combined;' |
| 318 | + match: ' access_log syslog:server=localhost;' |
319 | 319 | }, |
320 | 320 | { |
321 | 321 | title: 'should set format_log custom_format', |
|
905 | 905 | title: 'should set access_log', |
906 | 906 | attr: 'access_log', |
907 | 907 | value: '/path/to/access.log', |
908 | | - match: ' access_log /path/to/access.log combined;' |
| 908 | + match: ' access_log /path/to/access.log;' |
909 | 909 | }, |
910 | 910 | { |
911 | 911 | title: 'should set multiple access_log directives', |
912 | 912 | attr: 'access_log', |
913 | 913 | value: ['/path/to/log/1', 'syslog:server=localhost'], |
914 | 914 | match: [ |
915 | | - ' access_log /path/to/log/1 combined;', |
916 | | - ' access_log syslog:server=localhost combined;' |
| 915 | + ' access_log /path/to/log/1;', |
| 916 | + ' access_log syslog:server=localhost;' |
917 | 917 | ] |
918 | 918 | }, |
919 | 919 | { |
|
932 | 932 | title: 'should set access_log to syslog', |
933 | 933 | attr: 'access_log', |
934 | 934 | value: 'syslog:server=localhost', |
935 | | - match: ' access_log syslog:server=localhost combined;' |
| 935 | + match: ' access_log syslog:server=localhost;' |
936 | 936 | }, |
937 | 937 | { |
938 | 938 | title: 'should set format_log custom_format', |
|
1418 | 1418 | end |
1419 | 1419 |
|
1420 | 1420 | it { is_expected.to contain_nginx__resource__location("#{title}-default").with_ssl_only(true) } |
1421 | | - it { is_expected.to contain_concat__fragment("#{title}-ssl-header").with_content(%r{access_log\s+/var/log/nginx/ssl-www\.rspec\.example\.com\.access\.log combined;}) } |
| 1421 | + it { is_expected.to contain_concat__fragment("#{title}-ssl-header").with_content(%r{access_log\s+/var/log/nginx/ssl-www\.rspec\.example\.com\.access\.log;}) } |
1422 | 1422 | it { is_expected.to contain_concat__fragment("#{title}-ssl-header").with_content(%r{error_log\s+/var/log/nginx/ssl-www\.rspec\.example\.com\.error\.log}) } |
1423 | 1423 | it { is_expected.to contain_concat__fragment("#{title}-ssl-header").with_content(%r{ssl_certificate\s+dummy.cert;}) } |
1424 | 1424 | it { is_expected.to contain_concat__fragment("#{title}-ssl-header").with_content(%r{ssl_certificate_key\s+dummy.key;}) } |
|
1437 | 1437 | end |
1438 | 1438 |
|
1439 | 1439 | it { is_expected.to contain_nginx__resource__location("#{title}-default").with_ssl_only(true) } |
1440 | | - it { is_expected.to contain_concat__fragment("#{title}-ssl-header").with_content(%r{access_log\s+/var/log/nginx/ssl-www\.rspec\.example\.com\.access\.log combined;}) } |
| 1440 | + it { is_expected.to contain_concat__fragment("#{title}-ssl-header").with_content(%r{access_log\s+/var/log/nginx/ssl-www\.rspec\.example\.com\.access\.log;}) } |
1441 | 1441 | it { is_expected.to contain_concat__fragment("#{title}-ssl-header").with_content(%r{error_log\s+/var/log/nginx/ssl-www\.rspec\.example\.com\.error\.log}) } |
1442 | 1442 | it { is_expected.to contain_concat__fragment("#{title}-ssl-header").with_content(%r{ssl_verify_client\s+optional;}) } |
1443 | 1443 | end |
|
0 commit comments