Skip to content

Add "be_monitored_by" matcher for Service resource#187

Merged
mizzy merged 4 commits intomizzy:masterfrom
kitak:monitored_by
Jul 2, 2013
Merged

Add "be_monitored_by" matcher for Service resource#187
mizzy merged 4 commits intomizzy:masterfrom
kitak:monitored_by

Conversation

@kitak
Copy link
Copy Markdown
Contributor

@kitak kitak commented Jul 2, 2013

Serviceリソースで使える"be_monitored_by"マッチャを追加しました。
プロセスがプロセス監視・管理ツールで監視されていることを確認できます(現在はmonitのみの対応)。
以下が記述例になります。

describe service('unicorn') do
  it { should be_monitored_by('monit') }
end

最初はbe_running.under('monit')を用意しようと考えたのですが、supervisorが自身の子プロセスとして監視対象のプロセスを起動するのに対して、monitは監視する側される側に直接の関係がないので、be_monitored_byマッチャを用意しました。

matcherとcommandsのテストを記述して通ることを確認しています。

@mizzy
Copy link
Copy Markdown
Owner

mizzy commented Jul 2, 2013

グレート。

@mizzy mizzy merged commit 2d0feb0 into mizzy:master Jul 2, 2013
@kitak kitak deleted the monitored_by branch July 2, 2013 07:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants