Skip to content

Commit cd6ac82

Browse files
committed
simplify tests
1 parent fd6cbfb commit cd6ac82

File tree

1 file changed

+0
-69
lines changed

1 file changed

+0
-69
lines changed

default/serverspec/nginx_spec.rb

Lines changed: 0 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@
6363
end
6464
end
6565

66-
6766
describe 'Check for multiple instances' do
6867
describe command('ps aux | egrep "nginx: master" | egrep -v "grep" | wc -l') do
6968
its(:stdout) { should match(/^1$/) }
@@ -73,90 +72,22 @@
7372
# check configuration parameters
7473
describe 'check nginx configuration' do
7574

76-
7775
describe file_with_includes(nginx_conf, /^\s*include.*;\s*$/) do
7876
its(:content) { should_not match(/^\s*user root;$/) }
79-
end
80-
81-
82-
describe file_with_includes(nginx_conf, /^\s*include.*;\s*$/) do
8377
its(:content) { should_not match(/^\s*group root;$/) }
84-
end
85-
86-
87-
describe file_with_includes(nginx_conf, /^\s*include.*;\s*$/) do
8878
its(:content) { should match(/^\s*server_tokens off;$/) }
89-
end
90-
91-
92-
describe file_with_includes(nginx_conf, /^\s*include.*;\s*$/) do
9379
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
9880
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
10381
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
11882
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
12383
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
12884
its(:content) { should match(/^\s*client_body_timeout 10;$/) }
129-
end
130-
131-
132-
describe file_with_includes(nginx_conf, /^\s*include.*;\s*$/) do
13385
its(:content) { should match(/^\s*client_header_timeout 10;$/) }
134-
end
135-
136-
137-
describe file_with_includes(nginx_conf, /^\s*include.*;\s*$/) do
13886
its(:content) { should match(/^\s*send_timeout 10;$/) }
139-
end
140-
141-
142-
describe file_with_includes(nginx_conf, /^\s*include.*;\s*$/) do
14387
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
14888
its(:content) { should match(/^\s*limit_conn default 5;$/) }
149-
end
150-
151-
describe file_with_includes(nginx_conf, /^\s*include.*;\s*$/) do
15289
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
15690
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
16091
its(:content) { should match(/^\s*add_header X-XSS-Protection "1; mode=block";$/) }
16192
end
16293
end

0 commit comments

Comments
 (0)