ソースを参照

test(refactor): split tests (config/package/service)

tags/v0.4.0
Nicolas Rodriguez 5年前
コミット
b7fac62ef3
4個のファイルの変更34行の追加17行の削除
  1. +18
    -0
      test/integration/default/controls/config_spec.rb
  2. +7
    -0
      test/integration/default/controls/package_spec.rb
  3. +9
    -0
      test/integration/default/controls/service_spec.rb
  4. +0
    -17
      test/integration/default/controls/syslog_ng.rb

+ 18
- 0
test/integration/default/controls/config_spec.rb ファイルの表示

@@ -0,0 +1,18 @@
control 'SyslogNG configuration' do
title 'should match desired lines'

describe file('/etc/syslog-ng/syslog-ng.conf') do
# # Default config
# its('content') { should include '[inputs.diskio]' }
# its('content') { should include '[inputs.kernel]' }
# its('content') { should include '[inputs.mem]' }
# its('content') { should include '[inputs.processes]' }
# its('content') { should include '[inputs.swap]' }
# its('content') { should include '[inputs.system]' }

# # Custom config from pillar (default: nothing)
# its('content') { should include '[outputs.discard]' }

it { should exist }
end
end

+ 7
- 0
test/integration/default/controls/package_spec.rb ファイルの表示

@@ -0,0 +1,7 @@
control 'SyslogNG package' do
title 'should be installed'

describe package('syslog-ng') do
it { should be_installed }
end
end

+ 9
- 0
test/integration/default/controls/service_spec.rb ファイルの表示

@@ -0,0 +1,9 @@
control 'SyslogNG service' do
title 'should be running and enabled'

describe service('syslog-ng') do
it { should be_enabled }
it { should be_running }
end

end

+ 0
- 17
test/integration/default/controls/syslog_ng.rb ファイルの表示

@@ -1,17 +0,0 @@
# encoding: utf-8

title 'Test SyslogNG installation'

describe package('syslog-ng') do
it { should be_installed }
end

describe file('/etc/syslog-ng/syslog-ng.conf') do
it { should exist }
end

describe sysv_service('syslog-ng') do
it { should be_installed }
it { should be_enabled }
it { should be_running }
end

読み込み中…
キャンセル
保存