[yast-commit] <web-client> backgroud_patches_bnc550934 : add test for bnc#555204
![](https://seccdn.libravatar.org/avatar/f9a9cf77af20d925b328ee8c95c0068c.jpg?s=120&d=mm&r=g)
ref: refs/heads/backgroud_patches_bnc550934 commit 29afc1b199db7925cb108c00db8f8d2a29c981ec Author: Josef Reidinger <jreidinger@suse.cz> Date: Thu Nov 26 16:01:40 2009 +0100 add test for bnc#555204 --- .../test/functional/status_controller_test.rb | 31 ++++++++++++++++++++ 1 files changed, 31 insertions(+), 0 deletions(-) diff --git a/plugins/status/test/functional/status_controller_test.rb b/plugins/status/test/functional/status_controller_test.rb index 0667737..ec7be25 100644 --- a/plugins/status/test/functional/status_controller_test.rb +++ b/plugins/status/test/functional/status_controller_test.rb @@ -100,4 +100,35 @@ ATTR_DATA = { assert_valid_markup assert assigns(:logs) end + +OUT_SYNC_ERROR = <<EOF +<error> + <type>COLLECTD_SYNC_ERROR</type> + <description>blba bla</description> +</error> +EOF + +class ResponseMock + def body + return OUT_SYNC_ERROR + end + + def code + return "503" + end +end + +#status module must survive collectd out of sync + def test_collectd_out_of_sync + YaST::ServiceResource.stubs(:proxy_for).with('org.opensuse.yast.system.logs').returns(@logs_proxy) + sproxy = StatusProxy.new + YaST::ServiceResource.stubs(:proxy_for).with('org.opensuse.yast.system.status').returns(sproxy) + sproxy.stubs(:find).raises(ActiveResource::ServerError.new(ResponseMock.new,"")) + get :index + + assert_response :success + assert_valid_markup + assert assigns(:logs) + end + end -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
Josef Reidinger