Skip to content
Snippets Groups Projects
Commit 0cc8ef93 authored by Antal Wu-Hen-Chang's avatar Antal Wu-Hen-Chang
Browse files

HTTP_Client: connect test step added


Signed-off-by: default avatareantwuh <antal.wu-hen-chang@ericsson.com>
parent 8e543a35
No related branches found
No related tags found
No related merge requests found
......@@ -57,6 +57,20 @@ import from HTTPmsg_MessageLen all;
log(%definitionId, " finished");
}
function f_HTTP_Client_connect() runs on IFW_HTTP_Client_CT
{
log(%definitionId, " started");
var Result vl_result;
log("Connecting the socket to the remote");
vl_result := f_IPL4_connect(IPL4_PCO, ctx.remoteHost, ctx.remotePort, ctx.localHost, ctx.localPort, -1, {tcp := {}}, {{reuseAddress := {enable := true}}});
f_checkResult(vl_result);
ctx.connId := vl_result.connId;
log("ctx.connId: ", ctx.connId);
log(%definitionId, " finished");
}
function f_HTTP_Client_cleanUp() runs on IFW_HTTP_Client_CT
{
log(%definitionId, " started");
......
......@@ -49,6 +49,19 @@ module IFW_HTTP_Client_TestSteps {
return true;
}
function f_IFW_HttpClient_connect(in integer p_clientIdx) runs on IFW_MAIN_CT
return boolean
{
var IFW_HTTP_Client_CT v_client := httpClients[p_clientIdx];
if (v_client == null) { log("IFW: No http client found"); return false; }
f_isRunningGuard(v_client);
v_client.start(f_HTTP_Client_connect());
v_client.done;
return true;
}
function f_IFW_HttpClient_setRemote(in integer p_clientIdx, in charstring p_remoteAddrId) runs on IFW_MAIN_CT
return boolean
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment