dexter submitted this change.

View Change



1 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.

Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve
eim_Tests: Add testcase to test ESipa/ES9+: CancelSession

The testsuite never sends or receives any messages related to ESipa/ES9+
CancelSession, let's implement a varinat of the "Cancel Session Procedure
for Indirect Profile Download" as described in SGP.32 section 3.2.3.3 to
increase the coverage accordingly.

Related: SYS#8100
Change-Id: Iadc9010fcf08de98f7d8c2a5c68bb5ff71bfb1f6
---
M eim/eIM_Tests.ttcn
1 file changed, 59 insertions(+), 0 deletions(-)

diff --git a/eim/eIM_Tests.ttcn b/eim/eIM_Tests.ttcn
index 26fe2bf..21da52b 100644
--- a/eim/eIM_Tests.ttcn
+++ b/eim/eIM_Tests.ttcn
@@ -521,6 +521,64 @@
setverdict(pass);
}

+/* A testcase to try out an unsuccessful indirect profile download where the session gets canceled
+ * See also: GSMA SGP.32, section 3.2.3.3: Cancel Session Procedure for Indirect Profile Download */
+private function f_TC_proc_indirect_prfle_dwnld_cancel_session(charstring id) runs on eIM_ConnHdlr {
+ var charstring resource_id;
+ var HTTP_Adapter_Params http_adapter_pars;
+ var charstring smdpp_add := mp_es9p_ip & ":" & int2str(mp_es9p_port)
+ var charstring activationCode := "1$" & smdpp_add & "$MyMatchingId"
+ var template EsipaMessageFromEimToIpa esipa_res;
+ var octetstring eimTransactionId;
+
+ f_http_register();
+
+ f_init_pipe();
+ http_adapter_pars := {
+ http_host := mp_esipa_ip,
+ http_port := mp_esipa_port,
+ use_ssl := not mp_esipa_disable_ssl
+ };
+ f_http_init(http_adapter_pars);
+
+ /* Create a new download at the eIM */
+ resource_id := f_rest_create_order("download", ts_JSON_REST_download_order(eID, activationCode));
+
+ /* Check the eIM for new eIM packages, we expect to get a profileDownloadTriggerRequest that contains the
+ * activationCode that we have created the download with (see above) */
+ esipa_res := f_esipa_transceive(valueof(ts_getEimPackageRequest(eID)),
+ tr_getEimPackageResponse_dnlTrigReq(tr_profileDownloadTriggerRequest(activationCode)));
+ eimTransactionId := valueof(esipa_res.getEimPackageResponse.profileDownloadTriggerRequest.eimTransactionId);
+
+ /* Perform common mutial authentication procedure */
+ f_proc_cmn_mtl_auth(eimTransactionId);
+
+ /* Request/download bound profile package */
+ f_esipa_send(valueof(ts_getBoundProfilePackageRequestEsipa));
+ f_es9p_transceive(valueof(ts_getBoundProfilePackageResponse), tr_getBoundProfilePackageRequest);
+ f_esipa_receive(tr_getBoundProfilePackageResponseEsipa);
+
+ /* Cancel session */
+ f_esipa_send(valueof(ts_cancelSessionRequestEsipa));
+ f_es9p_transceive_empty_response(tr_cancelSessionRequestEs9);
+
+ f_rest_lookup_resource(resource_id, "download", tr_JSON_REST_success);
+ f_rest_delete_resource(resource_id, "download");
+
+ f_sleep(2.0);
+ setverdict(pass);
+}
+testcase TC_proc_indirect_prfle_dwnld_cancel_session() runs on MTC_CT {
+ var charstring id := testcasename();
+ var eIM_ConnHdlrPars pars := f_init_pars();
+ var eIM_ConnHdlr vc_conn;
+ f_init(id);
+ vc_conn := f_start_handler(refers(f_TC_proc_indirect_prfle_dwnld_cancel_session), pars);
+ vc_conn.done;
+ setverdict(pass);
+}
+
+
/* A testcase to try out an the Generic eUICC Package Download and Execution Procedure (PSMO),
* See also: GSMA SGP.32, section 3.3.1: Generic eUICC Package Download and Execution */
private function f_TC_proc_euicc_pkg_dwnld_exec_psmo_or_eco(charstring facility, charstring id,
@@ -949,6 +1007,7 @@

control {
execute ( TC_proc_indirect_prfle_dwnld() );
+ execute ( TC_proc_indirect_prfle_dwnld_cancel_session() );
execute ( TC_proc_euicc_pkg_dwnld_exec_enable_psmo() );
execute ( TC_proc_euicc_pkg_dwnld_exec_disable_psmo() );
execute ( TC_proc_euicc_pkg_dwnld_exec_delete_psmo() );

To view, visit change 43182. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: merged
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Iadc9010fcf08de98f7d8c2a5c68bb5ff71bfb1f6
Gerrit-Change-Number: 43182
Gerrit-PatchSet: 2
Gerrit-Owner: dexter <pmaier@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier@sysmocom.de>
Gerrit-Reviewer: laforge <laforge@osmocom.org>
Gerrit-Reviewer: pespin <pespin@sysmocom.de>