dexter has submitted this change. (
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/43536?usp=email )
Change subject: eIM_Tests: move response check into f_es9p_receive
......................................................................
eIM_Tests: move response check into f_es9p_receive
When passing messages via the ES9+ interface, we check the expected
response in f_es9p_transceive. However, we could also check it earlier
in f_es9p_receive. This allows gives use more freedom since we can now
use f_es9p_receive independently.
Change-Id: Iff20efba2e1ca749c258f375c7fea3fdfd3d74f6
Related: SYS#8203
---
M eim/eIM_Tests.ttcn
1 file changed, 7 insertions(+), 8 deletions(-)
Approvals:
osmith: Looks good to me, approved
pespin: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/eim/eIM_Tests.ttcn b/eim/eIM_Tests.ttcn
index 14370b6..ca490db 100644
--- a/eim/eIM_Tests.ttcn
+++ b/eim/eIM_Tests.ttcn
@@ -176,9 +176,9 @@
}
}
-
-private function f_es9p_receive() runs on eIM_ConnHdlr return
RemoteProfileProvisioningRequest {
/* Receive one ES9+ HTTP request */
+private function f_es9p_receive(template RemoteProfileProvisioningRequest
expected_es9p_req := omit)
+runs on eIM_ConnHdlr return RemoteProfileProvisioningRequest {
var HTTPMessage es9p_req;
timer T := 10.0;
var RemoteProfileProvisioningRequest request;
@@ -193,6 +193,10 @@
}
}
+ if (not istemplatekind(expected_es9p_req, "omit") and not
match(request, expected_es9p_req)) {
+ setverdict(fail, "unexpected request from eIM on ES9+");
+ }
+
return request;
}
@@ -208,13 +212,8 @@
template RemoteProfileProvisioningRequest
expected_es9p_req := omit)
runs on eIM_ConnHdlr return RemoteProfileProvisioningRequest {
var RemoteProfileProvisioningRequest es9p_req;
- es9p_req := f_es9p_receive();
+ es9p_req := f_es9p_receive(expected_es9p_req);
f_es9p_send(es9p_res);
- if (not istemplatekind(expected_es9p_req, "omit")) {
- if (not match(valueof(es9p_req), expected_es9p_req)) {
- setverdict(fail, "unexpected request from eIM on ES9p");
- }
- }
return es9p_req;
}
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/43536?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Iff20efba2e1ca749c258f375c7fea3fdfd3d74f6
Gerrit-Change-Number: 43536
Gerrit-PatchSet: 3
Gerrit-Owner: dexter <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <[email protected]>
Gerrit-Reviewer: osmith <[email protected]>
Gerrit-Reviewer: pespin <[email protected]>