diff options
author | Feng Pan <fpan@redhat.com> | 2016-11-07 19:22:21 -0500 |
---|---|---|
committer | Feng Pan <fpan@redhat.com> | 2016-11-21 21:27:09 -0500 |
commit | 9326e4237f4d161f297dc4493ab4928ea6e2bf0f (patch) | |
tree | 25372fa964fe84b160c5bfc58304285902edbefc /spec/classes/honeycomb_spec.rb | |
parent | c70bea9fb9cd5dfb29d7ab8f7aaae7324c31f1e3 (diff) |
Initial Commit.
Change-Id: I212ec4be42357edddd931e9e479e33131ccd4bac
Signed-off-by: Feng Pan <fpan@redhat.com>
Diffstat (limited to 'spec/classes/honeycomb_spec.rb')
-rw-r--r-- | spec/classes/honeycomb_spec.rb | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/spec/classes/honeycomb_spec.rb b/spec/classes/honeycomb_spec.rb new file mode 100644 index 0000000..8ba367a --- /dev/null +++ b/spec/classes/honeycomb_spec.rb @@ -0,0 +1,32 @@ +require 'spec_helper' + +describe 'fdio::honeycomb' do + let(:facts) {{ + :osfamily => 'RedHat', + :operatingsystem => 'CentOS', + :operatingsystemmajrelease => '7', + }} + + it { should compile } + it { should compile.with_all_deps } + it { should contain_class('fdio::honeycomb') } + it { should contain_class('fdio::install').that_comes_before('Class[fdio::config]') } + it { should contain_package('honeycomb').that_requires('Package[vpp]') } + it { should contain_file('honeycomb.json').that_requires('Package[honeycomb]') } + it { should contain_file('honeycomb.json').that_notifies('Service[honeycomb]') } + it { should contain_service('honeycomb').that_requires('Package[honeycomb]') } + it { should contain_service('honeycomb').that_requires('Vpp_service[vpp]') } + + it { should contain_file('honeycomb.json').with( + 'ensure' => 'file', + 'path' => '/opt/honeycomb/config/honeycomb.json', + 'owner' => 'honeycomb', + 'group' => 'honeycomb', + ) + } + it { should contain_service('honeycomb').with( + 'ensure' => 'running', + 'enable' => 'true', + ) + } +end |