- 公開日:2015年05月28日
いつも同じようなコードを書いているので、他のプロジェクトでも利用できるように代表的なテストコードを記載
環境
- centos6.6
- ruby 2.2.2p95
nginx_spec.rb
nginxのインストールは、rpmを利用して取得しています。
require 'spec_helper'
# ngix package & version check
describe package('nginx') do
it { should be_installed }
it { should be_installed.with_version "1.8.0" }
end
# port check
describe port(80) do
it { should be_listening }
end
# nginx service status
describe service('nginx') do
it { should be_enabled }
it { should be_running }
end
この記事は適宜更新していく予定です。
以上
0 件のコメント:
コメントを投稿