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

HTTP_Server::close() added


Signed-off-by: default avatareantwuh <antal.wu-hen-chang@ericsson.com>
parent 28e5d194
No related branches found
No related tags found
No related merge requests found
Showing
with 52 additions and 48 deletions
///////////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2000-2019 Ericsson Telecom AB
// Copyright (c) 2000-2020 Ericsson Telecom AB
//
// All rights reserved. This program and the accompanying materials
// are made available under the terms of the Eclipse Public License v2.0
......
///////////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2000-2019 Ericsson Telecom AB
// Copyright (c) 2000-2020 Ericsson Telecom AB
//
// All rights reserved. This program and the accompanying materials
// are made available under the terms of the Eclipse Public License v2.0
......
///////////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2000-2019 Ericsson Telecom AB
// Copyright (c) 2000-2020 Ericsson Telecom AB
//
// All rights reserved. This program and the accompanying materials
// are made available under the terms of the Eclipse Public License v2.0
......
///////////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2000-2019 Ericsson Telecom AB
// Copyright (c) 2000-2020 Ericsson Telecom AB
//
// All rights reserved. This program and the accompanying materials
// are made available under the terms of the Eclipse Public License v1.0
......
///////////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2000-2019 Ericsson Telecom AB
// Copyright (c) 2000-2020 Ericsson Telecom AB
//
// All rights reserved. This program and the accompanying materials
// are made available under the terms of the Eclipse Public License v2.0
......
///////////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2000-2019 Ericsson Telecom AB
// Copyright (c) 2000-2020 Ericsson Telecom AB
//
// All rights reserved. This program and the accompanying materials
// are made available under the terms of the Eclipse Public License v2.0
......
///////////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2000-2019 Ericsson Telecom AB
// Copyright (c) 2000-2020 Ericsson Telecom AB
//
// All rights reserved. This program and the accompanying materials
// are made available under the terms of the Eclipse Public License v2.0
......
///////////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2000-2019 Ericsson Telecom AB
// Copyright (c) 2000-2020 Ericsson Telecom AB
//
// All rights reserved. This program and the accompanying materials
// are made available under the terms of the Eclipse Public License v2.0
......@@ -11,7 +11,7 @@
// Description:
// Rev: <RnXnn>
// Prodnr: CNL 113 910
// Updated: 2020-02-06
// Updated: 2020-03-06
// Contact: http://ttcn.ericsson.se
///////////////////////////////////////////////////////////////////////////////
module IFW_HTTP_Server_Definitions
......
///////////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2000-2019 Ericsson Telecom AB
// Copyright (c) 2000-2020 Ericsson Telecom AB
//
// All rights reserved. This program and the accompanying materials
// are made available under the terms of the Eclipse Public License v2.0
......@@ -11,7 +11,7 @@
// Description:
// Rev: <RnXnn>
// Prodnr: CNL 113 910
// Updated: 2020-02-06
// Updated: 2020-03-06
// Contact: http://ttcn.ericsson.se
///////////////////////////////////////////////////////////////////////////////
module IFW_HTTP_Server_Functions
......@@ -141,6 +141,21 @@ module IFW_HTTP_Server_Functions
log("CHECK: return true");
return true;
}
function f_HTTP_Server_close() runs on IFW_HTTP_Server_CT
{
log(%definitionId, " started");
var Result vl_result;
log("Closing connection");
if (ctx.serverConnId >= 0)
{
vl_result := f_IPL4_close(IPL4_PCO, ctx.serverConnId, {tcp := {}});
//f_checkResult(vl_result);
}
log(%definitionId, " finished");
}
function f_HTTP_Server_getMessageLength(in octetstring stream, inout ro_integer args)
......
///////////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2000-2019 Ericsson Telecom AB
// Copyright (c) 2000-2020 Ericsson Telecom AB
//
// All rights reserved. This program and the accompanying materials
// are made available under the terms of the Eclipse Public License v2.0
......@@ -11,7 +11,7 @@
// Description:
// Rev: <RnXnn>
// Prodnr: CNL 113 910
// Updated: 2020-02-06
// Updated: 2020-03-06
// Contact: http://ttcn.ericsson.se
///////////////////////////////////////////////////////////////////////////////
module IFW_HTTP_Server_TestSteps
......@@ -126,5 +126,18 @@ module IFW_HTTP_Server_TestSteps
v_server.done(ReturnBoolean:?) -> value v_ret;
return v_ret;
}
}
function f_IFW_HttpServer_close(in integer p_serverIdx) runs on IFW_MAIN_CT
return boolean
{
var IFW_HTTP_Server_CT v_server := httpServers[p_serverIdx];
if (v_server == null) { log("IFW: No http server found"); return false; }
f_isRunningGuard(v_server);
v_server.start(f_HTTP_Server_close());
v_server.done;
return true;
}
}
///////////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2000-2019 Ericsson Telecom AB
// Copyright (c) 2000-2020 Ericsson Telecom AB
//
// All rights reserved. This program and the accompanying materials
// are made available under the terms of the Eclipse Public License v2.0
......
///////////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2000-2019 Ericsson Telecom AB
// Copyright (c) 2000-2020 Ericsson Telecom AB
//
// All rights reserved. This program and the accompanying materials
// are made available under the terms of the Eclipse Public License v2.0
......
///////////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2000-2019 Ericsson Telecom AB
// Copyright (c) 2000-2020 Ericsson Telecom AB
//
// All rights reserved. This program and the accompanying materials
// are made available under the terms of the Eclipse Public License v2.0
......
///////////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2000-2019 Ericsson Telecom AB
// Copyright (c) 2000-2020 Ericsson Telecom AB
//
// All rights reserved. This program and the accompanying materials
// are made available under the terms of the Eclipse Public License v2.0
......
///////////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2000-2019 Ericsson Telecom AB
// Copyright (c) 2000-2020 Ericsson Telecom AB
//
// All rights reserved. This program and the accompanying materials
// are made available under the terms of the Eclipse Public License v2.0
......
<?xml version="1.0" encoding="UTF-8"?>
<TITAN_Project_File_Information version="1.0">
<!--
Copyright (c) 2000-2019 Ericsson Telecom AB
Copyright (c) 2000-2020 Ericsson Telecom AB
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v2.0
which accompanies this distribution, and is available at
......
///////////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2000-2019 Ericsson Telecom AB
// Copyright (c) 2000-2020 Ericsson Telecom AB
//
// All rights reserved. This program and the accompanying materials
// are made available under the terms of the Eclipse Public License v2.0
......
///////////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2000-2019 Ericsson Telecom AB
// Copyright (c) 2000-2020 Ericsson Telecom AB
//
// All rights reserved. This program and the accompanying materials
// are made available under the terms of the Eclipse Public License v2.0
......
///////////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2000-2019 Ericsson Telecom AB
// Copyright (c) 2000-2020 Ericsson Telecom AB
//
// All rights reserved. This program and the accompanying materials
// are made available under the terms of the Eclipse Public License v2.0
......
///////////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2000-2019 Ericsson Telecom AB
// Copyright (c) 2000-2020 Ericsson Telecom AB
//
// All rights reserved. This program and the accompanying materials
// are made available under the terms of the Eclipse Public License v2.0
......@@ -323,33 +323,9 @@ module Lwm2mTestSuite
}
}
testcase tc_json_encdec() runs on IFW_MAIN_CT
{
log("data: ",t_res);
var octetstring v_encoded := f_enc_LwM2M_JSON_Resources(valueof(t_res));
log("encoded: ", oct2char(v_encoded), "\n", v_encoded);
var LwM2M_JSON_Resources v_decoded := f_dec_LwM2M_JSON_Resources(v_encoded);
if (match(v_decoded, t_res)) { setverdict(pass)}
else { setverdict(fail) }
}
template LwM2M_JSON_Resources t_res :=
{
e := {
{ n := "0", sv := "sg" },
{ n := "7/1", bv := true },
{ n := "11", v := 4.0 }
}
}
control
{
execute(tc_client_LightweightM2M_10_int_101_102_103_regdereg());
execute(tc_client_LightweightM2M_10_int_101_102_103_regdereg_lwm2mPDU());
execute(tc_json_encdec());
}
}
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