File tree Expand file tree Collapse file tree 5 files changed +43
-0
lines changed
integration/default/controls Expand file tree Collapse file tree 5 files changed +43
-0
lines changed Original file line number Diff line number Diff line change @@ -309,9 +309,13 @@ verifier:
309309suites :
310310 - name : default
311311 provisioner :
312+ dependencies :
313+ - name : test_dep
314+ path : test/salt/default/states
312315 state_top :
313316 base :
314317 ' * ' :
318+ - test_dep.create_dependency_file
315319 - nginx._mapdata
316320 - nginx
317321 pillars :
Original file line number Diff line number Diff line change 7171 its ( 'content' ) { should include 'try_files $uri $uri/ =404;' }
7272 its ( 'content' ) { should include 'include snippets/letsencrypt.conf;' }
7373 end
74+ describe file "#{ dir } /mysite_with_require" do
75+ it { should be_file }
76+ it { should be_owned_by file_owner }
77+ it { should be_grouped_into file_group }
78+ its ( 'mode' ) { should cmp '0644' }
79+ its ( 'content' ) { should include 'server_name with-deps;' }
80+ its ( 'content' ) { should include 'listen 80;' }
81+ its ( 'content' ) { should include 'index index.html index.htm;' }
82+ its ( 'content' ) { should include 'location ~ .htm {' }
83+ its ( 'content' ) { should include 'try_files $uri $uri/ =404;' }
84+ end
7485 end
7586end
Original file line number Diff line number Diff line change 1+ # frozen_string_literal: true
2+
3+ control 'Dependency test file' do
4+ title 'should exist'
5+
6+ describe file ( '/tmp/created_to_test_dependencies' ) do
7+ it { should be_file }
8+ end
9+ end
Original file line number Diff line number Diff line change @@ -37,6 +37,19 @@ nginx:
3737 - location ~ .htm :
3838 - try_files : ' $uri $uri/ =404'
3939 - include : ' snippets/letsencrypt.conf'
40+ mysite_with_require :
41+ enabled : true
42+ config :
43+ - server :
44+ - server_name : with-deps
45+ - listen :
46+ - ' 80'
47+ - index : ' index.html index.htm'
48+ - location ~ .htm :
49+ - try_files : ' $uri $uri/ =404'
50+ requires :
51+ file : created_to_test_dependencies
52+
4053 dh_param :
4154 ' mydhparam2.pem ' :
4255 keysize : 2048
Original file line number Diff line number Diff line change 1+ # # this state creates a file that is used to test vhosts dependencies
2+ # (see https://github.com/saltstack-formulas/nginx-formula/pull/278)
3+
4+ created_to_test_dependencies:
5+ file.managed :
6+ - name: /tmp/created_to_test_dependencies
You can’t perform that action at this time.
0 commit comments