Skip to content

Commit 8d1fdfb

Browse files
committed
Merge pull request #1251 from tphoney/remove_passenger_test
removing an over complicated test case
2 parents 2ca3ea9 + cc443e9 commit 8d1fdfb

File tree

1 file changed

+0
-110
lines changed

1 file changed

+0
-110
lines changed

spec/acceptance/mod_passenger_spec.rb

Lines changed: 0 additions & 110 deletions
Original file line numberDiff line numberDiff line change
@@ -194,115 +194,5 @@ class { 'apache::mod::passenger': }
194194
end
195195

196196
end
197-
198-
when 'RedHat'
199-
# no fedora 18 passenger package yet, and rhel5 packages only exist for ruby 1.8.5
200-
unless (fact('operatingsystem') == 'Fedora' and fact('operatingsystemrelease').to_f >= 18) or (fact('osfamily') == 'RedHat' and fact('operatingsystemmajrelease') == '5' and fact('rubyversion') != '1.8.5')
201-
202-
if fact('osfamily') == 'RedHat' and fact('operatingsystemmajrelease') == '7'
203-
pending('test passenger - RHEL7 packages don\'t exist')
204-
else
205-
context "default passenger config" do
206-
it 'succeeds in puppeting passenger' do
207-
pp = <<-EOS
208-
/* EPEL and passenger repositories */
209-
class { 'epel': }
210-
exec { 'passenger.repo GPG key':
211-
command => '/usr/bin/curl -o /etc/yum.repos.d/RPM-GPG-KEY-stealthymonkeys.asc http://passenger.stealthymonkeys.com/RPM-GPG-KEY-stealthymonkeys.asc',
212-
creates => '/etc/yum.repos.d/RPM-GPG-KEY-stealthymonkeys.asc',
213-
}
214-
file { 'passenger.repo GPG key':
215-
ensure => file,
216-
path => '/etc/yum.repos.d/RPM-GPG-KEY-stealthymonkeys.asc',
217-
require => Exec['passenger.repo GPG key'],
218-
}
219-
epel::rpm_gpg_key { 'passenger.stealthymonkeys.com':
220-
path => '/etc/yum.repos.d/RPM-GPG-KEY-stealthymonkeys.asc',
221-
require => [
222-
Class['epel'],
223-
File['passenger.repo GPG key'],
224-
]
225-
}
226-
$releasever_string = $operatingsystem ? {
227-
'Scientific' => '6',
228-
default => '$releasever',
229-
}
230-
yumrepo { 'passenger':
231-
baseurl => "http://passenger.stealthymonkeys.com/rhel/${releasever_string}/\\$basearch" ,
232-
descr => "Red Hat Enterprise ${releasever_string} - Phusion Passenger",
233-
enabled => 1,
234-
gpgcheck => 1,
235-
gpgkey => 'http://passenger.stealthymonkeys.com/RPM-GPG-KEY-stealthymonkeys.asc',
236-
mirrorlist => 'http://passenger.stealthymonkeys.com/rhel/mirrors',
237-
require => [
238-
Epel::Rpm_gpg_key['passenger.stealthymonkeys.com'],
239-
],
240-
}
241-
/* apache and mod_passenger */
242-
class { 'apache':
243-
require => [
244-
Class['epel'],
245-
],
246-
}
247-
class { 'apache::mod::passenger':
248-
require => [
249-
Yumrepo['passenger']
250-
],
251-
}
252-
#{pp_rackapp}
253-
EOS
254-
apply_manifest(pp, :catch_failures => true)
255-
end
256-
257-
describe service(service_name) do
258-
it { is_expected.to be_enabled }
259-
it { is_expected.to be_running }
260-
end
261-
262-
describe file(conf_file) do
263-
it { is_expected.to contain "PassengerRoot #{passenger_root}" }
264-
it { is_expected.to contain "PassengerRuby #{passenger_ruby}" }
265-
it { is_expected.to contain "PassengerTempDir #{passenger_tempdir}" }
266-
end
267-
268-
describe file(load_file) do
269-
it { is_expected.to contain "LoadModule passenger_module #{passenger_module_path}" }
270-
end
271-
272-
it 'should output status via passenger-memory-stats' do
273-
shell("/usr/bin/passenger-memory-stats", :pty => true) do |r|
274-
expect(r.stdout).to match(/Apache processes/)
275-
expect(r.stdout).to match(/Nginx processes/)
276-
expect(r.stdout).to match(/Passenger processes/)
277-
expect(r.stdout).to match(/### Processes: [0-9]+/)
278-
expect(r.stdout).to match(/### Total private dirty RSS: [0-9\.]+ MB/)
279-
280-
expect(r.exit_code).to eq(0)
281-
end
282-
end
283-
284-
it 'should output status via passenger-status' do
285-
shell("PASSENGER_TMPDIR=/var/run/rubygem-passenger /usr/bin/passenger-status") do |r|
286-
# spacing may vary
287-
r.stdout.should =~ /[\-]+ General information [\-]+/
288-
r.stdout.should =~ /max[ ]+= [0-9]+/
289-
r.stdout.should =~ /count[ ]+= [0-9]+/
290-
r.stdout.should =~ /active[ ]+= [0-9]+/
291-
r.stdout.should =~ /inactive[ ]+= [0-9]+/
292-
r.stdout.should =~ /Waiting on global queue: [0-9]+/
293-
294-
r.exit_code.should == 0
295-
end
296-
end
297-
298-
it 'should answer to passenger.example.com' do
299-
shell("/usr/bin/curl passenger.example.com:80") do |r|
300-
r.stdout.should =~ /^hello <b>world<\/b>$/
301-
r.exit_code.should == 0
302-
end
303-
end
304-
end
305-
end
306-
end
307197
end
308198
end

0 commit comments

Comments
 (0)