From ad93c05e72f1129176119434b1eefed28330e725 Mon Sep 17 00:00:00 2001 From: Daniel Willmann Date: Fri, 4 Dec 2020 14:14:38 +0100 Subject: [PATCH] gbproxy: Reset gbproxy bvc as well as ns state We need to ensure that before each test the gbproxy does not have any state. Move the vty commands into loops that run before we init either SGSN or PCU Gb. This ensures that we don't send some spurious block or other message at the start of the test. Related: SYS#5002 Change-Id: Iaedfadf94f716b190495a807c28785be0078addc --- gbproxy/GBProxy_Tests.ttcn | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/gbproxy/GBProxy_Tests.ttcn b/gbproxy/GBProxy_Tests.ttcn index 30a019e1d..c288adbc2 100644 --- a/gbproxy/GBProxy_Tests.ttcn +++ b/gbproxy/GBProxy_Tests.ttcn @@ -382,11 +382,17 @@ function f_init() runs on test_CT { f_init_vty(); for (i := 0; i < lengthof(mp_nsconfig_sgsn); i := i+1) { f_vty_transceive(GBPVTY, "nsvc nsei " & int2str(g_sgsn[i].cfg.nsei) & " force-unconfigured"); + } + for (i := 0; i < lengthof(mp_nsconfig_pcu); i := i+1) { + f_vty_transceive(GBPVTY, "nsvc nsei " & int2str(g_pcu[i].cfg.nsei) & " force-unconfigured"); + f_vty_transceive(GBPVTY, "delete-gbproxy-peer " & int2str(g_pcu[i].cfg.nsei) & " only-bvc"); + } + + for (i := 0; i < lengthof(mp_nsconfig_sgsn); i := i+1) { f_init_gb_sgsn(g_sgsn[i], "GbProxy_Test", i); } f_sleep(4.0); for (i := 0; i < lengthof(mp_nsconfig_pcu); i := i+1) { - f_vty_transceive(GBPVTY, "nsvc nsei " & int2str(g_pcu[i].cfg.nsei) & " force-unconfigured"); f_init_gb_pcu(g_pcu[i], "GbProxy_Test", i); }