jolly has uploaded this change for review.
IPAd: Add test to verify IPAd polling from two eIMs
Provide an eIM configuration with two eIMs. Expect the IPAd to poll both
eIMs for a package and processing it.
Related: SYS#8101
Change-Id: I87d62196f7e0b96070d162faf8f382ebba3fa017
---
M ipad/IPAd_Tests.ttcn
1 file changed, 31 insertions(+), 4 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/57/43657/1
diff --git a/ipad/IPAd_Tests.ttcn b/ipad/IPAd_Tests.ttcn
index 81e477d..1c29357 100644
--- a/ipad/IPAd_Tests.ttcn
+++ b/ipad/IPAd_Tests.ttcn
@@ -771,7 +771,7 @@
/* A testcase to try out an IpaEuiccDataRequest */
-private function f_package_euicc_data_req(charstring id) runs on IPAd_ConnHdlr {
+private function f_package_euicc_data_req(charstring id, charstring eim_id) runs on IPAd_ConnHdlr {
var charstring eim_fqdn := mp_esipa_ip & ":" & int2str(mp_esipa_port);
/* IPAd requests a package, we tell it to execute an ipaEuiccDataRequest */
@@ -782,7 +782,7 @@
f_vpcd_transceive(enc_EuiccConfiguredAddressesResponse(valueof(ts_euiccConfiguredAddressesResponse)));
f_vpcd_transceive(enc_EUICCInfo1(valueof(ts_EUICCInfo1)));
f_vpcd_transceive(enc_EUICCInfo2(valueof(ts_EUICCInfo2)));
- f_vpcd_transceive(enc_GetEimConfigurationDataResponse(valueof(ts_getEimConfigurationDataResponse(eim_fqdn))));
+ f_vpcd_transceive(enc_GetEimConfigurationDataResponse(valueof(ts_getEimConfigurationDataResponse(eim_fqdn, eim_id))));
f_vpcd_transceive(enc_GetCertsResponse(valueof(ts_getCertsResponse)));
f_vpcd_transceive(enc_RetrieveNotificationsListResponse(valueof(ts_retrieveNotificationsListResponse_prfleInstRes)));
f_vpcd_transceive(enc_SGP32_RetrieveNotificationsListResponse(valueof(ts_retrieveNotificationsListResponse_euiccPkgRes)));
@@ -795,11 +795,27 @@
f_respond_empty_notifications();
}
private function f_TC_proc_euicc_data_req(charstring id) runs on IPAd_ConnHdlr {
+ var integer i;
+
f_exec_ipad();
f_es10x_init();
f_http_register();
- f_package_euicc_data_req(id);
+ if (g_pars.second_eim) {
+ var charstring eim_fqdn := mp_esipa_ip & ":" & int2str(mp_esipa_port);
+
+ f_package_euicc_data_req(id, "myEIM_1");
+
+ /* IPAd requests a package for first eIM, we tell it that there is no package available */
+ f_esipa_transceive(valueof(ts_getEimPackageResponse_noEimPackageAvailable), tr_getEimPackageRequest);
+
+ /* Expect eIM initialization again. */
+ f_eim_init();
+
+ f_package_euicc_data_req(id, "myEIM_2");
+ } else {
+ f_package_euicc_data_req(id, "myEIM");
+ }
/* IPAd will poll for eIM package. */
f_terminate_poll_cycle();
@@ -822,6 +838,16 @@
setverdict(pass);
}
+testcase TC_proc_euicc_data_req_2eim() runs on MTC_CT {
+ var charstring id := testcasename();
+ var IPAd_ConnHdlrPars pars := f_init_pars(second_eim := true);
+ var IPAd_ConnHdlr vc_conn;
+ f_init(id);
+ vc_conn := f_start_handler(refers(f_TC_proc_euicc_data_req), pars);
+ vc_conn.done;
+ setverdict(pass);
+}
+
/* A testcase to try out what happens when the eIM package request is rejected */
private function f_TC_get_eim_pkg_req_rej(charstring id) runs on IPAd_ConnHdlr {
var charstring eim_fqdn := mp_esipa_ip & ":" & int2str(mp_esipa_port);
@@ -1230,7 +1256,7 @@
log("Testing euicc_pkg_dwnld_exec_rollback...");
f_package_euicc_pkg_dwnld_exec_rollback(id);
log("Testing euicc_data_req...");
- f_package_euicc_data_req(id);
+ f_package_euicc_data_req(id, "myEIM");
log("Testing euiccPackageRequest_PSMO...");
f_package_euiccPackageRequest_PSMO(id);
log("Testing indirect_prfle_dwnld_cancel_euicc...");
@@ -1265,6 +1291,7 @@
execute ( TC_proc_euicc_pkg_dwnld_exec() );
execute ( TC_proc_euicc_pkg_dwnld_exec_rollback() );
execute ( TC_proc_euicc_data_req() );
+ execute ( TC_proc_euicc_data_req_2eim() );
execute ( TC_get_eim_pkg_req_rej() );
execute ( TC_func_exec_fallback_mech() );
execute ( TC_func_ret_from_fallback() );
To view, visit change 43657. To unsubscribe, or for help writing mail filters, visit settings.