jolly has uploaded this change for review.

View Change

IPAd: Add support for testing IPAd polling two eIMs

A flag is used to send an EimConfigurationDataResponse to the IPAd with
two eIMs in the EimConfigurationData list. Tests can use that to verify
that both eIMs are polled correctly.

Note that both eIMs share the same FQDN. This makes the test cases
easier, because they don't require two HTTP servers at a time or need to
change the HTTP server address.

Related: SYS#8101
Change-Id: I14c3f09a4c21d5f643e6e499a095410b6c8f02ed
---
M ipad/IPAd_Tests.ttcn
M library/euicc/SGP32Definitions_Templates.ttcn
2 files changed, 33 insertions(+), 13 deletions(-)

git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/56/43656/1
diff --git a/ipad/IPAd_Tests.ttcn b/ipad/IPAd_Tests.ttcn
index 310315d..81e477d 100644
--- a/ipad/IPAd_Tests.ttcn
+++ b/ipad/IPAd_Tests.ttcn
@@ -105,13 +105,13 @@
};

type record IPAd_ConnHdlrPars {
- /* TODO: add some useful parameters */
+ boolean second_eim
};

-private function f_init_pars()
+private function f_init_pars(boolean second_eim := false)
runs on MTC_CT return IPAd_ConnHdlrPars {
var IPAd_ConnHdlrPars pars := {
- /* TODO: fill parameters with meaninful values */
+ second_eim := second_eim
};
return pars;
}
@@ -320,7 +320,6 @@
private function f_es10x_init(boolean iot := true,
boolean eim_init := true,
OCT1 dev_capa := '00'O) runs on IPAd_ConnHdlr {
- var charstring eim_fqdn := mp_esipa_ip & ":" & int2str(mp_esipa_port);
var octetstring term_capa;

/* If we decide not to use vpcd, then we must not initialize anything here */
@@ -353,14 +352,32 @@

/* Not all tests expect IPAd to query eUICC data and notfications before talking to eIM. */
if (eim_init) {
- /* Expect the IPAd to query the eIM configuration data from the eUICC */
- f_vpcd_transceive(enc_GetEimConfigurationDataResponse(valueof(ts_getEimConfigurationDataResponse(eim_fqdn))), 'BF5500'O);
-
- /* Expect the IPAd to query the eUICC for pending notifications, we respond with an empty list */
- f_vpcd_transceive(enc_RetrieveNotificationsListResponse(valueof(ts_retrieveNotificationsListResponse_empty)), 'BF2B00'O);
+ f_eim_init();
}
}

+private function f_eim_init() runs on IPAd_ConnHdlr {
+ var charstring eim_fqdn := mp_esipa_ip & ":" & int2str(mp_esipa_port);
+
+ template (value) GetEimConfigurationDataResponse v_getEimConfigurationDataResponse_2eim := {
+ eimConfigurationDataList := {
+ ts_eimConfigurationData(eimFqdn := eim_fqdn, eimId := "myEIM_1"),
+ ts_eimConfigurationData(eimFqdn := eim_fqdn, eimId := "myEIM_2")
+ }
+ }
+
+ /* Expect the IPAd to query the eIM configuration data from the eUICC */
+ if (g_pars.second_eim) {
+ /* Note: Both eIM configurations have thee same FQDN. No second HTTP server is required for testing. */
+ f_vpcd_transceive(enc_GetEimConfigurationDataResponse(valueof(v_getEimConfigurationDataResponse_2eim)), 'BF5500'O);
+ } else {
+ f_vpcd_transceive(enc_GetEimConfigurationDataResponse(valueof(ts_getEimConfigurationDataResponse(eim_fqdn))), 'BF5500'O);
+ }
+
+ /* Expect the IPAd to query the eUICC for pending notifications, we respond with an empty list */
+ f_vpcd_transceive(enc_RetrieveNotificationsListResponse(valueof(ts_retrieveNotificationsListResponse_empty)), 'BF2B00'O);
+}
+
/* Handle the closing of logical channel 1 */
private function f_es10x_close() runs on IPAd_ConnHdlr {

diff --git a/library/euicc/SGP32Definitions_Templates.ttcn b/library/euicc/SGP32Definitions_Templates.ttcn
index ab27369..31d183d 100644
--- a/library/euicc/SGP32Definitions_Templates.ttcn
+++ b/library/euicc/SGP32Definitions_Templates.ttcn
@@ -1656,8 +1656,9 @@
indirectProfileDownload := *
}
template (value) EimConfigurationData
-ts_eimConfigurationData(template (omit) charstring eimFqdn := omit) := {
- eimId := "myEIM",
+ts_eimConfigurationData(template (omit) charstring eimFqdn := omit,
+ template (value) charstring eimId := "myEIM") := {
+ eimId := eimId,
eimFqdn := eimFqdn,
eimIdType := omit,
counterValue := omit,
@@ -1673,9 +1674,11 @@
eimConfigurationDataList := ?
}
template (value) GetEimConfigurationDataResponse
-ts_getEimConfigurationDataResponse(template (value) charstring eimFqdn := "127.0.0.1") := {
+ts_getEimConfigurationDataResponse(template (value) charstring eimFqdn := "127.0.0.1",
+ template (value) charstring eimId := "myEIM") := {
eimConfigurationDataList := {
- ts_eimConfigurationData(eimFqdn)
+ ts_eimConfigurationData(eimFqdn := eimFqdn,
+ eimId := eimId)
}
}


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

Gerrit-MessageType: newchange
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I14c3f09a4c21d5f643e6e499a095410b6c8f02ed
Gerrit-Change-Number: 43656
Gerrit-PatchSet: 1
Gerrit-Owner: jolly <andreas@eversberg.eu>