dexter has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/43536?usp=email )


Change subject: eIM_Tests: move esponse check into f_es9p_receive
......................................................................

eIM_Tests: move esponse 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(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/36/43536/1

diff --git a/eim/eIM_Tests.ttcn b/eim/eIM_Tests.ttcn
index aa26d6d..7a8a937 100644
--- a/eim/eIM_Tests.ttcn
+++ b/eim/eIM_Tests.ttcn
@@ -165,9 +165,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;
@@ -182,6 +182,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;
 }

@@ -197,13 +201,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: newchange
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Iff20efba2e1ca749c258f375c7fea3fdfd3d74f6
Gerrit-Change-Number: 43536
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <[email protected]>

Reply via email to