|
63 | 63 | end |
64 | 64 | end |
65 | 65 |
|
66 | | - |
67 | 66 | describe 'Check for multiple instances' do |
68 | 67 | describe command('ps aux | egrep "nginx: master" | egrep -v "grep" | wc -l') do |
69 | 68 | its(:stdout) { should match(/^1$/) } |
|
73 | 72 | # check configuration parameters |
74 | 73 | describe 'check nginx configuration' do |
75 | 74 |
|
76 | | - |
77 | 75 | describe file_with_includes(nginx_conf, /^\s*include.*;\s*$/) do |
78 | 76 | its(:content) { should_not match(/^\s*user root;$/) } |
79 | | - end |
80 | | - |
81 | | - |
82 | | - describe file_with_includes(nginx_conf, /^\s*include.*;\s*$/) do |
83 | 77 | its(:content) { should_not match(/^\s*group root;$/) } |
84 | | - end |
85 | | - |
86 | | - |
87 | | - describe file_with_includes(nginx_conf, /^\s*include.*;\s*$/) do |
88 | 78 | its(:content) { should match(/^\s*server_tokens off;$/) } |
89 | | - end |
90 | | - |
91 | | - |
92 | | - describe file_with_includes(nginx_conf, /^\s*include.*;\s*$/) do |
93 | 79 | its(:content) { should match(/^\s*client_body_buffer_size\s*1k;$/) } |
94 | | - end |
95 | | - |
96 | | - |
97 | | - describe file_with_includes(nginx_conf, /^\s*include.*;\s*$/) do |
98 | 80 | its(:content) { should match(/^\s*client_max_body_size\s*1k;$/) } |
99 | | - end |
100 | | - |
101 | | - |
102 | | - describe file_with_includes(nginx_conf, /^\s*include.*;\s*$/) do |
103 | 81 | its(:content) { should match(/^\s*keepalive_timeout\s+5 5;$/) } |
104 | | - end |
105 | | - |
106 | | - # |
107 | | - # describe file_with_includes(nginx_conf, /^\s*include.*;\s*$/) do |
108 | | - # its(:content) { should match(/^\s*more_clear_headers 'Server';$/) } |
109 | | - # end |
110 | | - |
111 | | - # |
112 | | - # describe file_with_includes(nginx_conf, /^\s*include.*;\s*$/) do |
113 | | - # its(:content) { should match(/^\s*more_clear_headers 'X-Powered-By';$/) } |
114 | | - # end |
115 | | - |
116 | | - |
117 | | - describe file_with_includes(nginx_conf, /^\s*include.*;\s*$/) do |
118 | 82 | its(:content) { should match(/^\s*client_header_buffer_size 1k;$/) } |
119 | | - end |
120 | | - |
121 | | - |
122 | | - describe file_with_includes(nginx_conf, /^\s*include.*;\s*$/) do |
123 | 83 | its(:content) { should match(/^\s*large_client_header_buffers 2 1k;$/) } |
124 | | - end |
125 | | - |
126 | | - |
127 | | - describe file_with_includes(nginx_conf, /^\s*include.*;\s*$/) do |
128 | 84 | its(:content) { should match(/^\s*client_body_timeout 10;$/) } |
129 | | - end |
130 | | - |
131 | | - |
132 | | - describe file_with_includes(nginx_conf, /^\s*include.*;\s*$/) do |
133 | 85 | its(:content) { should match(/^\s*client_header_timeout 10;$/) } |
134 | | - end |
135 | | - |
136 | | - |
137 | | - describe file_with_includes(nginx_conf, /^\s*include.*;\s*$/) do |
138 | 86 | its(:content) { should match(/^\s*send_timeout 10;$/) } |
139 | | - end |
140 | | - |
141 | | - |
142 | | - describe file_with_includes(nginx_conf, /^\s*include.*;\s*$/) do |
143 | 87 | its(:content) { should match(/^\s*limit_conn_zone \$binary_remote_addr zone=default:10m;$/) } |
144 | | - end |
145 | | - |
146 | | - |
147 | | - describe file_with_includes(nginx_conf, /^\s*include.*;\s*$/) do |
148 | 88 | its(:content) { should match(/^\s*limit_conn default 5;$/) } |
149 | | - end |
150 | | - |
151 | | - describe file_with_includes(nginx_conf, /^\s*include.*;\s*$/) do |
152 | 89 | its(:content) { should match(/^\s*add_header X-Frame-Options SAMEORIGIN;$/) } |
153 | | - end |
154 | | - |
155 | | - describe file_with_includes(nginx_conf, /^\s*include.*;\s*$/) do |
156 | 90 | its(:content) { should match(/^\s*add_header X-Content-Type-Options nosniff;$/) } |
157 | | - end |
158 | | - |
159 | | - describe file_with_includes(nginx_conf, /^\s*include.*;\s*$/) do |
160 | 91 | its(:content) { should match(/^\s*add_header X-XSS-Protection "1; mode=block";$/) } |
161 | 92 | end |
162 | 93 | end |
0 commit comments