Mailinglist Archive: yast-commit (1914 mails)

< Previous Next >
[yast-commit] <rest-service> basesystem : use 503 error code instead 409
  • From: Josef Reidinger <jreidinger@xxxxxxx>
  • Date: Thu, 27 Aug 2009 17:03:55 +0200
  • Message-id: <E1Mlezs-00044Y-ML@xxxxxxxxxxxxxxxx>
ref: refs/heads/basesystem
commit 15c9cbba06c81e2312c1f7783635590e6ca785b9
Author: Josef Reidinger <jreidinger@xxxxxxx>
Date: Thu Aug 27 17:03:55 2009 +0200

use 503 error code instead 409
---
.../app/controllers/application_controller.rb | 2 +-
.../test/functional/permissions_controller_test.rb | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/webservice/app/controllers/application_controller.rb
b/webservice/app/controllers/application_controller.rb
index 51eea1c..165d8fa 100644
--- a/webservice/app/controllers/application_controller.rb
+++ b/webservice/app/controllers/application_controller.rb
@@ -3,7 +3,7 @@

class ApplicationController < ActionController::Base
rescue_from 'BackendException' do |exception|
- render :xml => exception, :status => 409
+ render :xml => exception, :status => 503
end

include AuthenticatedSystem
diff --git a/webservice/test/functional/permissions_controller_test.rb
b/webservice/test/functional/permissions_controller_test.rb
index 51e080d..3cd3bfc 100644
--- a/webservice/test/functional/permissions_controller_test.rb
+++ b/webservice/test/functional/permissions_controller_test.rb
@@ -36,7 +36,7 @@ class PermissionsControllerTest < ActionController::TestCase
ENV['RAILS_ENV'] = "production"
get :index
ENV['RAILS_ENV'] = save
- assert_response 409
+ assert_response 503
end

test "permissions access index xml" do
@@ -97,7 +97,7 @@ class PermissionsControllerTest < ActionController::TestCase
ENV['RAILS_ENV'] = "production" # do a real permission_check
get :show, :id => "org.opensuse.yast.system.read"
ENV['RAILS_ENV'] = save
- assert_response 409
+ assert_response 503
end

test "permissions access show without right" do
@@ -133,7 +133,7 @@ class PermissionsControllerTest < ActionController::TestCase
ENV['RAILS_ENV'] = "production"
put :update, :id=>"nobody"
ENV['RAILS_ENV'] = save
- assert_response 409
+ assert_response 503
end

test "setting permissions without user" do
--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages