remsim: Add TC_slotmap_del_nonexistant()

Let's test that deleting a non-existant slotmap from server renders
HTTP status 404.

Change-Id: Ib74fea146017ffc68b75ec175472842b689891c3
This commit is contained in:
Harald Welte 2020-02-20 10:12:28 +01:00
parent b79bc601da
commit 3993c81b79
1 changed files with 11 additions and 1 deletions

View File

@ -357,6 +357,16 @@ testcase TC_slotmap_del_new() runs on test_CT {
log(res);
}
/* simple delete of a non-existant slotmap */
testcase TC_slotmap_del_nonexistant() runs on test_CT {
f_rsres_init();
var JsSlotmap sm := valueof(ts_JsSlotmap(ts_BankSlot(11,12), ts_ClientSlot(13,14)));
var HTTPResponse res := f_rsres_delete_slotmap(sm.bank, exp_sts:=404);
log(res);
}
/* simple delete of a 'UNACKNOWLEDGED' slotmap */
testcase TC_slotmap_del_unack() runs on test_CT {
var ComponentIdentity rspro_id := valueof(ts_CompId(remsimBankd, testcasename()));
@ -511,7 +521,6 @@ testcase TC_slotmap_add_active_bank() runs on test_CT {
/* TODO
* - connect client w/slotmap; delete slotmap via REST (see if it is deleted)
* - don't acknowledge delete from client, disconnect client (see if slotmap is deleted)
* - delete non-existing slotmap via REST
* - create slotmap with integers out of range via REST
* - connect from unknown client (name not known, no clientId provisioned?
@ -527,6 +536,7 @@ control {
execute( TC_slotmap_add_conn_cl_b() );
execute( TC_conn_cl_b_slotmap_add() );
execute( TC_slotmap_del_new() );
execute( TC_slotmap_del_nonexistant() );
execute( TC_slotmap_del_unack() );
execute( TC_slotmap_del_active() );
execute( TC_slotmap_del_active_client() );