|
90 | 90 | node.set['postfix-dovecot']['postfix']['srpm']['rpm_regexp'] = |
91 | 91 | rpm_regexp |
92 | 92 | expect(chef_run).to run_execute('install postfix from SRPM') |
93 | | - .with_command( |
94 | | - "rpm -i '#{buildroot}/RPMS/x86_64/#{rpm}'" |
95 | | - ) |
| 93 | + .with_command("rpm -i '#{buildroot}/RPMS/x86_64/#{rpm}'") |
96 | 94 | end |
97 | 95 | end |
98 | 96 |
|
|
122 | 120 | end |
123 | 121 |
|
124 | 122 | context 'with CentOS 7' do |
125 | | - let(:rpm) { "foobar-1.0_19.centos.#{node['kernel']['machine']}.tar.gz" } |
| 123 | + let(:rpm) do |
| 124 | + "postfix-2.10.1-6.el7.centos.#{node['kernel']['machine']}.rpm" |
| 125 | + end |
| 126 | + let(:srpm) { 'postfix-2.10.1-6.el7.src.rpm' } |
126 | 127 | let(:rpmbuild_args) { '--with=pgsql' } |
127 | 128 | before do |
128 | 129 | node.automatic['platform'] = 'centos' |
|
132 | 133 | %w( |
133 | 134 | postgresql-devel rpm-build zlib-devel openldap-devel libdb-devel |
134 | 135 | cyrus-sasl-devel pcre-devel openssl-devel perl-Date-Calc gcc |
135 | | - mariadb-devel |
| 136 | + mariadb-devel pkgconfig ed |
136 | 137 | ).each do |pkg| |
137 | 138 | it "installs #{pkg} package" do |
138 | 139 | expect(chef_run).to install_package(pkg) |
|
141 | 142 |
|
142 | 143 | it 'installs the correct RPM' do |
143 | 144 | expect(chef_run).to run_execute('install postfix from SRPM') |
144 | | - .with_command( |
145 | | - "rpm -i '#{buildroot}/RPMS/x86_64/#{rpm}'" |
146 | | - ) |
| 145 | + .with_command("rpm -i '#{buildroot}/RPMS/x86_64/#{rpm}'") |
147 | 146 | end |
148 | 147 |
|
149 | 148 | it 'uses the correct rpmbuild args' do |
|
155 | 154 | end # context on CentOS 7 |
156 | 155 |
|
157 | 156 | context 'with CentOS 6' do |
158 | | - let(:rpm) { "foobar-1.0.#{node['kernel']['machine']}.tar.gz" } |
| 157 | + let(:rpm) { "postfix-2.6.6-6.el6.1.#{node['kernel']['machine']}.rpm" } |
| 158 | + let(:srpm) { 'postfix-2.6.6-6.el6_7.1.src.rpm' } |
159 | 159 | let(:rpmbuild_args) { '--define="PGSQL 1"' } |
160 | 160 | before do |
161 | 161 | node.automatic['platform'] = 'centos' |
|
165 | 165 | %w( |
166 | 166 | postgresql-devel rpm-build zlib-devel openldap-devel db4-devel |
167 | 167 | cyrus-sasl-devel pcre-devel openssl-devel perl-Date-Calc gcc |
168 | | - mysql-devel |
| 168 | + mysql-devel pkgconfig ed |
169 | 169 | ).each do |pkg| |
170 | 170 | it "installs #{pkg} package" do |
171 | 171 | expect(chef_run).to install_package(pkg) |
|
174 | 174 |
|
175 | 175 | it 'installs the correct RPM' do |
176 | 176 | expect(chef_run).to run_execute('install postfix from SRPM') |
177 | | - .with_command( |
178 | | - "rpm -i '#{buildroot}/RPMS/x86_64/#{rpm}'" |
179 | | - ) |
| 177 | + .with_command("rpm -i '#{buildroot}/RPMS/x86_64/#{rpm}'") |
180 | 178 | end |
181 | 179 |
|
182 | 180 | it 'uses the correct rpmbuild args' do |
|
208 | 206 | %w( |
209 | 207 | postgresql-devel rpm-build zlib-devel openldap-devel libdb-devel |
210 | 208 | cyrus-sasl-devel pcre-devel openssl-devel perl-Date-Calc gcc |
211 | | - mariadb-devel |
| 209 | + mariadb-devel pkgconfig ed libicu-devel sqlite-devel tinycdb-devel |
212 | 210 | ).each do |pkg| |
213 | 211 | it "installs #{pkg} package" do |
214 | 212 | expect(chef_run).to install_package(pkg) |
|
217 | 215 |
|
218 | 216 | it 'installs the correct RPM' do |
219 | 217 | expect(chef_run).to run_execute('install postfix from SRPM') |
220 | | - .with_command( |
221 | | - "rpm -i '#{buildroot}/RPMS/x86_64/#{rpm}'" |
222 | | - ) |
| 218 | + .with_command("rpm -i '#{buildroot}/RPMS/x86_64/#{rpm}'") |
223 | 219 | end |
224 | 220 |
|
225 | 221 | it 'uses the correct rpmbuild args' do |
|
230 | 226 | end |
231 | 227 | end # context on Fedora |
232 | 228 |
|
| 229 | + context 'with Fedora 24' do |
| 230 | + before do |
| 231 | + node.automatic['platform'] = 'fedora' |
| 232 | + node.automatic['platform_version'] = '23.0' |
| 233 | + end |
| 234 | + |
| 235 | + %w( |
| 236 | + postfix |
| 237 | + postfix-pgsql |
| 238 | + ).each do |pkg| |
| 239 | + it "installs #{pkg} package" do |
| 240 | + expect(chef_run).to install_package(pkg) |
| 241 | + end |
| 242 | + end |
| 243 | + end # context on Fedora 23 |
| 244 | + |
233 | 245 | context 'with Amazon' do |
234 | 246 | let(:pc_shell_out) { instance_double('Mixlib::ShellOut') } |
235 | 247 | let(:gr_shell_out) { instance_double('Mixlib::ShellOut') } |
|
286 | 298 | %w( |
287 | 299 | postgresql-devel rpm-build zlib-devel openldap-devel db4-devel |
288 | 300 | cyrus-sasl-devel pcre-devel openssl-devel perl-Date-Calc gcc |
289 | | - mysql-devel |
| 301 | + mysql-devel pkgconfig ed |
290 | 302 | ).each do |pkg| |
291 | 303 | it "installs #{pkg} package" do |
292 | 304 | expect(chef_run).to install_package(pkg) |
|
295 | 307 |
|
296 | 308 | it 'installs the correct RPM' do |
297 | 309 | expect(chef_run).to run_execute('install postfix from SRPM') |
298 | | - .with_command( |
299 | | - "rpm -i '#{buildroot}/RPMS/x86_64/#{rpm}'" |
300 | | - ) |
| 310 | + .with_command("rpm -i '#{buildroot}/RPMS/x86_64/#{rpm}'") |
301 | 311 | end |
302 | 312 |
|
303 | 313 | it 'uses the correct rpmbuild args' do |
|
0 commit comments