stp: fix TC_rkm_unreg_registered

Create the routing key dynamically, before trying to unregister it. The
previous version tried to unregister a statically configured routing
key, as in TC_rkm_unreg_never_registered, but expected success instead
of the proper ERR_NOT_REG.

So after fixing osmo-stp to make TC_rkm_unreg_never_registered pass,
this test failed.

Related: OS#4239
Change-Id: I7d2f9eb298778a8e60c7e73f314bc73528e85406
This commit is contained in:
Oliver Smith 2021-07-23 10:42:10 +02:00 committed by laforge
parent 1447535a07
commit 326d78ed84
1 changed files with 14 additions and 2 deletions

View File

@ -615,11 +615,23 @@ testcase TC_rkm_unreg_invalid() runs on RAW_M3UA_CT {
f_clear_m3ua();
}
/* try to de-register a routing key that was registered -> OK*/
/* try to de-register a routing key that was registered -> OK */
testcase TC_rkm_unreg_registered() runs on RAW_M3UA_CT {
var OCT3 dpc := int2oct(123, 3);
var OCT4 rctx := int2oct(1234, 4);
f_init_common();
f_vty_config2(VTY, {"cs7 instance 0"}, "xua rkm routing-key-allocation dynamic-permitted");
f_init_m3ua();
f_M3UA_send(0, ts_M3UA_DEREG_REQ(ts_M3UA_routing_ctx(int2oct(mp_m3ua_configs[0].routing_ctx,4))));
/* first register the routing key */
f_M3UA_rkm_register(id:='30000099'O, dpc:=dpc, rctx:=rctx);
/* then try to de-register */
f_M3UA_send(0, ts_M3UA_DEREG_REQ(ts_M3UA_routing_ctx(rctx)));
f_M3UA_exp(0, tr_M3UA_DEREG_RSP({tr_M3UA_dereg_res(?,c_m3UA_DEREGSTS_SUCCESS)}));
f_vty_config2(VTY, {"cs7 instance 0"}, "xua rkm routing-key-allocation static-only");
f_clear_m3ua();
}