Commit Graph

18 Commits

Author SHA1 Message Date
Harald Welte 06f0949316 RSPRO_Server: Ignore any ID RESP messages from the client for now
More recent clients start to send ID RESP, which was not the case at the
time the TTCN3 test suite was written.

As we don't really want to test the IPA CCM behavior, but we want to
test the actual remsim functionality, we can simply ignore any such
responses.

Change-Id: Id557ea9c540bf96465e7f18da87719888dd7a318
2020-12-01 12:06:33 +00:00
Vadim Yanitskiy a2afacc905 library/IPA: use tr_ASP_IPA_EV instead of inline templates
This way we can easily add new parameters to ASP_IPA_Event.

Change-Id: Icc37286fcb4d43836d56a26424ecb9dcba58d1f1
2020-05-18 21:16:35 +07:00
Vadim Yanitskiy 61564be045 library/IPA: split t_ASP_IPA_EVT_UD into send / receive templates
Change-Id: Ib5494bff3f9aa0ac396b729c326e7b4a64c5a5dd
2020-05-18 20:47:14 +07:00
Harald Welte b12a0ffc03 remsim: Add RemsimServer_Tests.TC_slotmap_add_out_of_range()
Validate if osmo-remsim-server permits out-of-range integers in REST.

Change-Id: I449541420a15826ed0d2f1460e3ca4b3468662c3
2020-02-20 18:48:22 +01:00
Harald Welte 3993c81b79 remsim: Add TC_slotmap_del_nonexistant()
Let's test that deleting a non-existant slotmap from server renders
HTTP status 404.

Change-Id: Ib74fea146017ffc68b75ec175472842b689891c3
2020-02-20 10:12:28 +01:00
Harald Welte b79bc601da remsim: Update TODO list
Change-Id: I1c6b1c7c1ced88db56940d2cef78193a13a15af6
2020-02-20 10:06:15 +01:00
Harald Welte 15be5d6866 remsim: Add global guard timer to client+bankd tests
Change-Id: I85d436a91d1c805f2fb66138ef7e2fb73107f2d1
2020-02-19 20:09:02 +01:00
Harald Welte 34b9da299c remsim: Add tests using stdin/stdout of osmo-remsim-client-shell
osmo-remsim-client-shell allows to send C-APDU via STDIN of the program
and receive R-APDU via STDOUT.  We can attach to that using the PIPEasp
TTCN3 port, and hence test a [local] osmo-remsim-client-shell
transceiving APDUs from/to a simulated bankd in the test case.

The only sad part about this is that we now will need to have the
implementation under test (osmo-remsim-client-shell binary) in the
same container as the TTCN-3 test, as it will fork/exec it.

This is why we disable it by default and a modulepar must be used to
enable those particular tests.

Change-Id: I3a69c692cf3e6bbe04ce58594050b20da0c37d16
2020-02-19 19:56:30 +01:00
Harald Welte 9073295230 remsim: Integrate VPCD test port into RemsimBankd_Tests.ttcn
VPCD (specifically ifd-vpcd) is an ifd-handler (reader driver)
for a virtual smart card reader integrated with pcsc-lite.  It is
part of the virtualsmartcard project.   Using this ifd-vpcd, we
can implementa virtual smart card reader beneath osmo-remsim-bankd,
which allows us to implement both the smart card [reader] below
osmo-remsim-bankd as well as the osmo-remsim-server + client above
osmo-remsim-bankd - in other words a fully virtualized test fixture for
bankd.

Change-Id: I967f2d526f4ef1278bd2ac1d590a8dce732379d5
2020-02-17 22:47:11 +01:00
Harald Welte 776b0e5444 remsim: Add client TC_bank_disconnect + TC_bank_disconnect_reconnect
This extends remsim-client test coverage to situations where the
server removes an existing/established mapping, and possibly later
establishes a new mapping.

Change-Id: I8df29a91718b6b2829415fc040b647a58eb71292
Related: OS#4399
2020-02-16 16:33:06 +01:00
Harald Welte c7b496cd06 remsim: More comments in RemsimClient_Tests
Change-Id: I02363eaaaae6d7b849cd2a1d2b07f1343d58c2f2
2020-02-16 16:33:06 +01:00
Harald Welte 77cde21fb5 remsim: New TC_slotmap_del_active_client() test
This test verifies that a slotmap delete via REST will not only
delete it from the bankd, but also from the client.

Change-Id: I8c4e53231b5386b00fe2938cde2091aa8b2e2027
Related: OS#4399
2020-02-16 15:35:59 +01:00
Harald Welte beba4e56a0 remsim: Two new bankd test cases about slotmap re-creation
If a slotmap is re-created with identical client+bankd, we expect
no change and the client-bankd connection to persist.

If a slotmap is overwritten with a create for a different client
than the currently connected one, we expect the client connection
to be closed.

Change-Id: If81e1511521fe478d2367104cd1c7eba254d6450
Related: OS#4278
2019-12-04 22:10:58 +01:00
Harald Welte bca0ecd282 resmim: Adjust TC_createMapping_busySlot to current bankd code
Since osmo-remsim Change-Id I83e319d22896b881c0d882542842f500075aa546
createMapping will overwrite any existing mappings that may already
exist for that bank-slot.  We need to adjust our test expectations
accordingly.

Change-Id: Ia8de9edd7edb0437cd783b7d045571ff69820c42
Related: OS#4278
2019-12-04 22:10:53 +01:00
Harald Welte d14ad4ccba remsim: Reset the bankd-side state at start of test
In general we don't want that bankd retains state from one test
case to another.  Let's issue the new RSPRO ResetStateReq at the
start of each relevant test

Change-Id: If810ccbbc848dd2448a4eaea20c80f60f15a2e84
2019-12-04 21:55:05 +01:00
Harald Welte eb172b3942 remsim: Update RSPRO for ResetState{Req,Res} messages
Change-Id: Ia9520b50c4ec2e703cc876cc7f79f3aeda90dba3
2019-12-04 21:55:05 +01:00
Harald Welte 04c7a3d669 REMSIM_Tests: Fix REMSIM_Tests.cfg
Change-Id: Ia31c5e440fc8daec92a620c9aea7432b6cf7ea17
2019-11-22 00:40:15 +01:00
Harald Welte faa4292444 Initial TTCN-3 test suite for osmo-remsim
This adds shared infrastructure and initial test suites for
osmo-remsim-{server,client,bankd}.

Change-Id: I00034d3a991f0f881cfd8ff0bfc4557113daf830
2019-09-13 11:45:45 +00:00