Commit 54eeb503 authored by Hugo Roenick's avatar Hugo Roenick
Browse files

Commit final do item [OPENBUS-1698]: Adequar testes do SDK Lua para não...

Commit final do item [OPENBUS-1698]: Adequar testes do SDK Lua para não utilizar ferramenta de governança diretamente no teste


git-svn-id: https://subversion.tecgraf.puc-rio.br/engdist/openbus/sdk/lua/branches/OB_SDK_LUA_v1_05_03_2011_07_28@128735 ae0415b3-e90b-0410-900d-d0be9363c56b
parent db1099ba
host.name = localhost
host.port = 2089
host.name = localhost
host.port = 2089
user = tester
password = tester
oil.verbose = 0
......
......@@ -241,60 +241,17 @@ Suite = {
Test3 = { -- Testa connectByCertificate
beforeTestCase = function(self)
local OPENBUS_HOME = os.getenv("OPENBUS_HOME")
local ltime = tostring(socket.gettime())
ltime = string.gsub(ltime, "%.", "")
self.systemId = "TesteBarramento".. ltime
self.systemId = "TesteBarramento"
self.deploymentId = self.systemId
self.testKeyFile = self.systemId .. ".key"
self.acsCertFile = "AccessControlService.crt"
local testACSCertFile = assert(io.open(self.acsCertFile,"r"))
testACSCertFile:close()
os.execute(OPENBUS_HOME.."/specs/shell/openssl-generate.ksh -n " .. self.systemId .. " -c "..OPENBUS_HOME.."/openssl/openssl.cnf <TesteBarramentoCertificado_input.txt 2> genkey-err.txt >genkeyT.txt ")
os.execute(OPENBUS_HOME.."/bin/run_management.sh --acs-host=" .. host ..
" --acs-port=" .. port ..
" --login=tester" ..
" --password=tester" ..
" --add-system="..self.systemId ..
" --description=Teste_do_OpenBus" ..
" 2>> management-err.txt >>management.txt ")
os.execute(OPENBUS_HOME.."/bin/run_management.sh --acs-host=" .. host ..
" --acs-port=" .. port ..
" --login=tester" ..
" --password=tester" ..
" --add-deployment="..self.deploymentId ..
" --system="..self.systemId ..
" --description=Teste_do_Barramento" ..
" --certificate="..self.systemId..".crt"..
" 2>> management-err.txt >>management.txt ")
Openbus:init(host, port, nil, iConfig)
end,
afterTestCase = function(self)
Openbus:destroy()
local OPENBUS_HOME = os.getenv("OPENBUS_HOME")
os.execute(OPENBUS_HOME.."/bin/run_management.sh --acs-host=" .. host ..
" --acs-port=" .. port ..
" --login=tester" ..
" --password=tester" ..
" --del-deployment="..self.deploymentId..
" 2>> management-err.txt >>management.txt ")
os.execute(OPENBUS_HOME.."/bin/run_management.sh --acs-host=" .. host ..
" --acs-port=" .. port ..
" --login=tester" ..
" --password=tester" ..
" --del-system="..self.systemId..
" 2>> management-err.txt >>management.txt ")
--Apaga as chaves e certificados gerados
os.execute("rm -r " .. self.systemId .. ".key")
os.execute("rm -r " .. self.systemId .. ".crt")
end,
afterEachTest = function(self)
......
Category {
id = "OpenbusLegacyTest",
name = "Categoria para testes Legados",
}
Entity {
id = "TesteBarramento",
category = "OpenbusLegacyTest",
name = "Entidade de testes Legados",
}
Certificate {
id = "TesteBarramento",
certificate = "TesteBarramento.crt",
}
System {
id = "OpenbusLegacyTest",
description = "Categoria para testes Legados",
}
SystemDeployment {
id = "TesteBarramento",
system = "OpenbusLegacyTest",
description = "Entidade de testes Legados",
certificate = "TesteBarramento.crt",
}
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