File tree 5 files changed +43
-0
lines changed
integration/default/controls 5 files changed +43
-0
lines changed Original file line number Diff line number Diff line change @@ -309,9 +309,13 @@ verifier:
309
309
suites :
310
310
- name : default
311
311
provisioner :
312
+ dependencies :
313
+ - name : test_dep
314
+ path : test/salt/default/states
312
315
state_top :
313
316
base :
314
317
' * ' :
318
+ - test_dep.create_dependency_file
315
319
- nginx._mapdata
316
320
- nginx
317
321
pillars :
Original file line number Diff line number Diff line change 71
71
its ( 'content' ) { should include 'try_files $uri $uri/ =404;' }
72
72
its ( 'content' ) { should include 'include snippets/letsencrypt.conf;' }
73
73
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
74
85
end
75
86
end
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:
37
37
- location ~ .htm :
38
38
- try_files : ' $uri $uri/ =404'
39
39
- 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
+
40
53
dh_param :
41
54
' mydhparam2.pem ' :
42
55
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