This repository was archived by the owner on Jun 11, 2019. It is now read-only.
File tree 3 files changed +36
-2
lines changed
3 files changed +36
-2
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ fixtures:
5
5
" firewall " : " git://github.com/example42/puppet-firewall.git"
6
6
" iptables " : " git://github.com/example42/puppet-iptables.git"
7
7
" concat " : " git://github.com/example42/puppet-concat.git"
8
+ " apache " : " git://github.com/example42/puppet-apache.git"
8
9
" stdlib " : " https://github.com/puppetlabs/puppetlabs-stdlib"
9
10
symlinks :
10
11
" tomcat " : " #{source_dir}"
Original file line number Diff line number Diff line change 427
427
fail(' You must specify the parameter apache_vhost_server_name on your tomcat::install when apache_vhost_create == true' )
428
428
}
429
429
430
+ $proxy_alias = $array_instance_apache_vhost_proxy_alias
430
431
apache::vhost { $instance_name:
431
- server_name => $apache_vhost_server_name ,
432
- proxy_alias => $array_instance_apache_vhost_proxy_alias ,
432
+ server_name => $apache_vhost_server_name ,
433
433
template => $apache_vhost_template ,
434
434
docroot => $apache_vhost_docroot ,
435
435
}
Original file line number Diff line number Diff line change 8
8
:http_port => 8080 ,
9
9
:control_port => 8480 ,
10
10
} }
11
+ let ( :facts ) { {
12
+ :operatingsystem => 'CentOS' ,
13
+ :osfamily => 'RedHat' ,
14
+ } }
11
15
12
16
describe 'Test CentOS usage' do
13
17
let ( :facts ) { {
36
40
it { should contain_file ( 'instance_tomcat_defaults_tomcat_instance' ) . with_path ( '/etc/default/tomcat6-tomcat_instance' ) }
37
41
end
38
42
43
+ describe "Test apache vhost creation" do
44
+ let ( :params ) { {
45
+ :http_port => 8080 ,
46
+ :control_port => 8480 ,
47
+ :apache_vhost_create => true ,
48
+ :apache_vhost_server_name => 'tomcat.example42.com' ,
49
+ } }
50
+
51
+ describe "Simple" do
52
+ it { should contain_file ( '/etc/httpd/conf.d/50-tomcat_instance.conf' ) . with_content ( /ProxyPass \/ tomcat_instance http:\/ \/ localhost:8080\/ tomcat_instance/ ) }
53
+ it { should contain_file ( '/etc/httpd/conf.d/50-tomcat_instance.conf' ) . with_content ( /ProxyPassReverse \/ tomcat_instance http:\/ \/ localhost:8080\/ tomcat_instance/ ) }
54
+ end
55
+
56
+ describe "With manager enabled" do
57
+ let ( :params ) { {
58
+ :http_port => 8080 ,
59
+ :control_port => 8480 ,
60
+ :apache_vhost_create => true ,
61
+ :apache_vhost_server_name => 'tomcat.example42.com' ,
62
+ :manager => true ,
63
+ } }
64
+ it { should contain_apache__vhost ( 'tomcat_instance' ) . with_server_name ( 'tomcat.example42.com' ) }
65
+ it { should contain_file ( '/etc/httpd/conf.d/50-tomcat_instance.conf' ) . with_content ( /ProxyPass \/ tomcat_instance http:\/ \/ localhost:8080\/ tomcat_instance/ ) }
66
+ it { should contain_file ( '/etc/httpd/conf.d/50-tomcat_instance.conf' ) . with_content ( /ProxyPassReverse \/ tomcat_instance http:\/ \/ localhost:8080\/ tomcat_instance/ ) }
67
+ it { should contain_file ( '/etc/httpd/conf.d/50-tomcat_instance.conf' ) . with_content ( /ProxyPassReverse \/ manager http:\/ \/ localhost:8080\/ manager/ ) }
68
+ it { should contain_file ( '/etc/httpd/conf.d/50-tomcat_instance.conf' ) . with_content ( /ProxyPassReverse \/ manager http:\/ \/ localhost:8080\/ manager/ ) }
69
+ end
70
+ end
71
+
39
72
40
73
end
41
74
You can’t perform that action at this time.
0 commit comments