Commit 633bd6e6 authored by Renato Figueiro Maia's avatar Renato Figueiro Maia

[OPENBUS-2864] Erros de validadores de senha ou token resultam em ServiceFailure para o cliente

- Correções devido a uma confusão no uso da função lançamento da exceção ServiceFailure e seu repID.
- Implementação de testes.

git-svn-id: https://subversion.tecgraf.puc-rio.br/engdist/openbus/sdk/lua/branches/02_00_00@168726 ae0415b3-e90b-0410-900d-d0be9363c56b
parent a32e7460
......@@ -160,6 +160,13 @@ do log:TEST "connect to unavailable port"
end
end
do log:TEST "password validator error"
local conn = OpenBusContext:createConnection(bushost, busport)
local ex = catcherr(conn.loginByPassword, conn, "error", "Oops!")
assert(ex._repid == idl.types.services.ServiceFailure)
assert(string.find(ex.message, "Oops!") ~= nil)
end
do log:TEST "connect to bus"
for i = 1, 2 do
conns[i] = assertlogoff(OpenBusContext:createConnection(bushost, busport))
......
......@@ -143,6 +143,13 @@ do log:TEST "connect to unavailable port"
end
end
do log:TEST "password validator error"
local conn = assistant.create{orb=orb, bushost=bushost, busport=busport}
local ex = catcherr(conn.loginByPassword, conn, "error", "Oops!")
assert(ex._repid == idl.types.services.ServiceFailure)
assert(string.find(ex.message, "Oops!") ~= nil)
end
do log:TEST "connect to bus"
for i = 1, 2 do
conns[i] = assertlogoff(assistant.create{orb=orb, bushost=bushost, busport=busport})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment