mirror of
https://github.com/internetee/registry.git
synced 2025-06-05 04:07:33 +02:00
parent
744d6a2b53
commit
daeb00ebe7
4 changed files with 7 additions and 3 deletions
|
@ -79,8 +79,8 @@ module Epp
|
|||
|
||||
if success && EppSession.limit_reached?(@api_user.registrar)
|
||||
epp_errors << {
|
||||
msg: 'Authentication error; server closing connection (connection limit reached)',
|
||||
code: '2501'
|
||||
msg: 'Session limit exceeded; server closing connection (connection limit reached)',
|
||||
code: '2502',
|
||||
}
|
||||
|
||||
success = false
|
||||
|
|
|
@ -30,6 +30,7 @@ module Epp
|
|||
data_management_policy_violation: 2308,
|
||||
command_failed: 2400,
|
||||
authentication_error_server_closing_connection: 2501,
|
||||
session_limit_exceeded_server_closing_connection: 2502,
|
||||
}.freeze
|
||||
private_constant :KEY_TO_VALUE
|
||||
|
||||
|
@ -59,6 +60,7 @@ module Epp
|
|||
2308 => 'Data management policy violation',
|
||||
2400 => 'Command failed',
|
||||
2501 => 'Authentication error; server closing connection',
|
||||
2502 => 'Session limit exceeded; server closing connection',
|
||||
}.freeze
|
||||
private_constant :DEFAULT_DESCRIPTIONS
|
||||
|
||||
|
|
|
@ -169,6 +169,6 @@ class EppLoginTest < EppTestCase
|
|||
assert_no_difference 'EppSession.count' do
|
||||
post '/epp/session/login', { frame: request_xml }, 'HTTP_COOKIE' => 'session=new-session-id'
|
||||
end
|
||||
assert_epp_response :authentication_error_server_closing_connection
|
||||
assert_epp_response :session_limit_exceeded_server_closing_connection
|
||||
end
|
||||
end
|
||||
|
|
|
@ -51,6 +51,7 @@ class EppResponseResultCodeTest < ActiveSupport::TestCase
|
|||
data_management_policy_violation: 2308,
|
||||
command_failed: 2400,
|
||||
authentication_error_server_closing_connection: 2501,
|
||||
session_limit_exceeded_server_closing_connection: 2502,
|
||||
}
|
||||
assert_equal codes, Epp::Response::Result::Code.codes
|
||||
end
|
||||
|
@ -82,6 +83,7 @@ class EppResponseResultCodeTest < ActiveSupport::TestCase
|
|||
2308 => 'Data management policy violation',
|
||||
2400 => 'Command failed',
|
||||
2501 => 'Authentication error; server closing connection',
|
||||
2502 => 'Session limit exceeded; server closing connection',
|
||||
}
|
||||
assert_equal descriptions, Epp::Response::Result::Code.default_descriptions
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue