Commit 774ff02e authored by Renato Figueiro Maia's avatar Renato Figueiro Maia

[OPENBUS-2545] (Lua) Incluir funcionalidade de construção de cadeia a partir...

[OPENBUS-2545] (Lua) Incluir funcionalidade de construção de cadeia a partir de prova externa ao OpenBus no núcleo
- Alteração na API do validador de tokens para permitir criar cadeias com login IDs distintos.



git-svn-id: https://subversion.tecgraf.puc-rio.br/engdist/openbus/sdk/lua/trunk@165927 ae0415b3-e90b-0410-900d-d0be9363c56b
parent 4f81bfb6
local _G = require "_G"
local assert = _G.assert
local pcall = _G.pcall
local uuid = require "uuid"
local giop = require "oil.corba.giop"
local openbus = require "openbus"
local idl = require "openbus.core.idl"
......@@ -46,11 +47,11 @@ for _, count in ipairs{0, 1, 10, 100} do
local imported = OpenBusContext:importChain(token, domain)
assert(imported.busid == busid)
assert(imported.target == entity)
assert(imported.caller.id == "<unknown>")
assert(uuid.isvalid(imported.caller.id))
assert(imported.caller.entity == "ExternalCaller")
assert(#imported.originators == #originators)
for index, entity in ipairs(originators) do
assert(imported.originators[index].id == "<unknown>")
assert(uuid.isvalid(imported.originators[index].id))
assert(imported.originators[index].entity == "ExternalOriginator"..index)
end
......@@ -64,10 +65,10 @@ for _, count in ipairs{0, 1, 10, 100} do
assert(joined.caller.entity == entity)
assert(#joined.originators == 1+#originators)
for index, entity in ipairs(originators) do
assert(joined.originators[index].id == "<unknown>")
assert(uuid.isvalid(joined.originators[index].id))
assert(joined.originators[index].entity == "ExternalOriginator"..index)
end
assert(joined.originators[1+#originators].id == "<unknown>")
assert(uuid.isvalid(joined.originators[1+#originators].id))
assert(joined.originators[1+#originators].entity == "ExternalCaller")
OpenBusContext:setDefaultConnection(nil)
......
......@@ -17,6 +17,7 @@ openbus/test/util/database \
openbus/test/NoLoginIceptorCalls \
openbus/test/Concurrency \
openbus/test/MakeChainFor \
openbus/test/ImportChain \
openbus/test/ChainExport \
openbus/test/LoginLogout \
openbus/test/assistant/Concurrency \
......
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