File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change 9191 it { is_expected . to contain_class ( 'zabbix::params' ) }
9292 end
9393
94+ describe "when zabbix_type is server and version is #{ zabbix_version } and custom port is defined" do
95+ let :params do
96+ {
97+ database_name : 'zabbix-server' ,
98+ database_user : 'zabbix-server' ,
99+ database_password : 'zabbix-server' ,
100+ database_host : 'node01.example.com' ,
101+ database_port : 6432 ,
102+ zabbix_type : 'server' ,
103+ zabbix_version : zabbix_version
104+ }
105+ end
106+
107+ it { is_expected . to compile . with_all_deps }
108+ it { is_expected . to contain_exec ( 'update_pgpass' ) . with_command ( 'echo node01.example.com:6432:zabbix-server:zabbix-server:zabbix-server >> /root/.pgpass' ) }
109+ it { is_expected . to contain_exec ( 'zabbix_server_create.sql' ) . with_command ( "cd #{ path } && if [ -f #{ sql_server } .gz ]; then gunzip -f #{ sql_server } .gz ; fi && psql -h 'node01.example.com' -U 'zabbix-server' -p 6432 -d 'zabbix-server' -f #{ sql_server } && touch /etc/zabbix/.schema.done" ) }
110+ it { is_expected . to contain_exec ( 'zabbix_server_images.sql' ) . with_command ( 'touch /etc/zabbix/.images.done' ) }
111+ it { is_expected . to contain_exec ( 'zabbix_server_data.sql' ) . with_command ( 'touch /etc/zabbix/.data.done' ) }
112+ it { is_expected . to contain_file ( '/root/.pgpass' ) }
113+ it { is_expected . to contain_class ( 'zabbix::params' ) }
114+ end
115+
94116 describe "when zabbix_type is proxy and version is #{ zabbix_version } " do
95117 let :params do
96118 {
You can’t perform that action at this time.
0 commit comments