|
1 | 1 | require 'spec_helper'
|
2 | 2 |
|
3 |
| -describe 'newrelic::agent::php', :type => :class do |
4 |
| - let(:facts) do |
| 3 | +describe 'newrelic::agent::php', type: :class do |
| 4 | + let(:facts) do |
5 | 5 | {
|
6 | 6 | 'os' => {
|
7 | 7 | 'family' => 'RedHat',
|
8 | 8 | 'name' => 'CentOS',
|
9 | 9 | 'release' => {
|
10 |
| - 'major' => '7' |
11 |
| - } |
| 10 | + 'major' => '7', |
| 11 | + }, |
12 | 12 | },
|
13 | 13 | 'operatingsystem' => 'Centos',
|
14 |
| - 'path' => '/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/opt/puppetlabs/bin:/opt/puppetlabs/puppet/bin:/root/.local/bin:/root/bin' |
15 |
| - } |
| 14 | + 'path' => '/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/opt/puppetlabs/bin:/opt/puppetlabs/puppet/bin:/root/.local/bin:/root/bin', |
| 15 | + } |
16 | 16 | end
|
17 | 17 |
|
18 | 18 | let(:params) do
|
19 | 19 | {
|
20 |
| - :license_key => '1234567890qwerty', |
21 |
| - :conf_dir => '/opt/rh/php54/root/etc/php.d', |
| 20 | + license_key: '1234567890qwerty', |
| 21 | + conf_dir: '/opt/rh/php54/root/etc/php.d', |
22 | 22 | }
|
23 | 23 | end
|
24 | 24 |
|
25 | 25 | it { is_expected.to compile }
|
26 |
| - it { should contain_class('newrelic::params') } |
27 |
| - it { should contain_class('newrelic::repo::legacy') } |
28 |
| - it { should contain_package('newrelic-php5') } |
29 |
| - it { should contain_package('php-cli') } |
30 |
| - it { should contain_file('/etc/newrelic/newrelic.cfg') } |
31 |
| - it { should contain_file('/opt/rh/php54/root/etc/php.d/newrelic.ini') } |
32 |
| - it { should contain_exec('newrelic install') } |
33 |
| - it { should contain_exec('newrelic_kill') } |
34 |
| - |
| 26 | + it { is_expected.to contain_class('newrelic::params') } |
| 27 | + it { is_expected.to contain_class('newrelic::repo::legacy') } |
| 28 | + it { is_expected.to contain_package('newrelic-php5') } |
| 29 | + it { is_expected.to contain_package('php-cli') } |
| 30 | + it { is_expected.to contain_file('/etc/newrelic/newrelic.cfg') } |
| 31 | + it { is_expected.to contain_file('/opt/rh/php54/root/etc/php.d/newrelic.ini') } |
| 32 | + it { is_expected.to contain_exec('newrelic install') } |
| 33 | + it { is_expected.to contain_exec('newrelic_kill') } |
35 | 34 |
|
36 | 35 | context 'startup_mode => external' do
|
37 | 36 | let(:params) do
|
38 |
| - super().merge({ 'startup_mode' => 'external' }) |
| 37 | + super().merge('startup_mode' => 'external') |
39 | 38 | end
|
40 |
| - it { should contain_service('newrelic-daemon') } |
| 39 | + |
| 40 | + it { is_expected.to contain_service('newrelic-daemon') } |
41 | 41 | end
|
42 | 42 | end
|
0 commit comments