dexter has uploaded this change for review.
eIM: add testcase to test an unsuccessful eUICC data request
When we test the ipaEuiccDataRequest/IpaEuiccDataResponse, we currently
only test the success case. However, we should also test the failure
case, bceause an IpaEuiccDataResponseError can also contain an
eimTransactionId, which has to be equal to the eimTransactionId we have
received with the ipaEuiccDataRequest
Related: SYS#8100
Change-Id: Ied212eb636cf46df5fc9f86ddee15c242c50d45a
---
M eim/eIM_Tests.ttcn
1 file changed, 44 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/55/42955/1
diff --git a/eim/eIM_Tests.ttcn b/eim/eIM_Tests.ttcn
index 8f48528..6e7c016 100644
--- a/eim/eIM_Tests.ttcn
+++ b/eim/eIM_Tests.ttcn
@@ -793,6 +793,49 @@
setverdict(pass);
}
+/* A testcase to try out an unsuccessful eUICC data request,
+ * See also: GSMA SGP.32, section 2.11.1.2: IpaEuiccDataRequest */
+private function f_TC_proc_euicc_data_req_err(charstring id) runs on eIM_ConnHdlr {
+ var charstring resource_id;
+ var HTTP_Adapter_Params http_adapter_pars;
+ var template EsipaMessageFromEimToIpa esipa_res;
+ var template 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("edr", ts_JSON_REST_edr_order(eID, '80BF20BF228384A5A688A9BF2B'O));
+
+ /* Check the eIM for new eIM packages, we expect to get a getEimPackageResponse that contains an
+ * ipaEuiccDataRequest */
+ esipa_res := f_esipa_transceive(valueof(ts_getEimPackageRequest(eID)), tr_getEimPackageResponse_euiccDataReq);
+ eimTransactionId := valueof(esipa_res.getEimPackageResponse.ipaEuiccDataRequest.eimTransactionId);
+
+ /* Provide a plausible ipaEuiccDataResponse to the eIM */
+ f_esipa_transceive(valueof(ts_provideEimPackageResult_euiccDataResp_err(eID, eimTransactionId)),
+ tr_provideEimPackageResultResponse_empty);
+
+ f_rest_lookup_resource(resource_id, "edr", tr_JSON_REST_success);
+ f_rest_delete_resource(resource_id, "edr");
+}
+testcase TC_proc_euicc_data_req_err() 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_euicc_data_req_err), pars);
+ vc_conn.done;
+ setverdict(pass);
+}
+
control {
execute ( TC_proc_indirect_prfle_dwnld() );
execute ( TC_proc_euicc_pkg_dwnld_exec_enable_psmo() );
@@ -807,6 +850,7 @@
execute ( TC_proc_euicc_pkg_dwnld_exec_updateEim_eco() );
execute ( TC_proc_euicc_pkg_dwnld_exec_listEim_eco() );
execute ( TC_proc_euicc_data_req() );
+ execute ( TC_proc_euicc_data_req_err() );
}
}
To view, visit change 42955. To unsubscribe, or for help writing mail filters, visit settings.