summaryrefslogtreecommitdiffstats
path: root/ggsn_tests/GGSN_Tests.ttcn
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2018-01-29 13:09:00 +0100
committerPau Espin Pedrol <pespin@sysmocom.de>2018-01-29 13:09:00 +0100
commitf69a4380108ddfc670ac07fa704dbf7a138ae134 (patch)
treec4149d536187b9d6d834d6a5ca3b244a2bffc8a8 /ggsn_tests/GGSN_Tests.ttcn
parent11ad2afd06ded033e396c95177a318a79cf9db8e (diff)
ggsn_tests: Configure expected GGSN DNS values and improve error message
Diffstat (limited to 'ggsn_tests/GGSN_Tests.ttcn')
-rw-r--r--ggsn_tests/GGSN_Tests.ttcn13
1 files changed, 11 insertions, 2 deletions
diff --git a/ggsn_tests/GGSN_Tests.ttcn b/ggsn_tests/GGSN_Tests.ttcn
index 23e7054..06d9dcf 100644
--- a/ggsn_tests/GGSN_Tests.ttcn
+++ b/ggsn_tests/GGSN_Tests.ttcn
@@ -23,6 +23,9 @@ module GGSN_Tests {
charstring m_ggsn_ip_gtpc := "127.0.0.6";
charstring m_ggsn_ip_gtpu := "127.0.0.6";
+
+ charstring m_ggsn_ip4_dns1 := "192.168.100.1"
+ charstring m_ggsn_ip4_dns2 := "8.8.8.8"
}
type set PdpContext {
@@ -954,6 +957,8 @@ module GGSN_Tests {
/* Test PDP context activation for dynamic IPv4 EUA with IPv4 DNS in IPCP */
testcase TC_pdp4_act_deact_ipcp() runs on GT_CT {
f_init();
+ var OCT4 ggsn_ip4_dns1 := f_inet_addr(m_ggsn_ip4_dns1);
+ var OCT4 ggsn_ip4_dns2 := f_inet_addr(m_ggsn_ip4_dns2);
var PdpContext ctx := valueof(t_DefinePDP(f_rnd_imsi('26242'H), '1234'O, c_ApnInternet, valueof(t_EuaIPv4Dyn)));
ctx.pco_req := valueof(ts_PCO_IPv4_DNS_IPCP);
f_pdp_ctx_act(ctx);
@@ -963,8 +968,12 @@ module GGSN_Tests {
}
/* verify IPCP contains both primary and secondary DNS */
var IpcpPacket ipcp := dec_IpcpPacket(f_PCO_extract_proto(ctx.pco_neg, '8021'O));
- if (not match(ipcp, tr_IPCP_Ack_DNS(0, 'C0A86401'O, '08080808'O))) {
- setverdict(fail, "Primary/Secondary DNS not found in IPCP");
+ if (not match(ipcp, tr_IPCP_Ack_DNS(0, ggsn_ip4_dns1, ggsn_ip4_dns2))) {
+ if (not match(ipcp, tr_IPCP_Ack_DNS(0))) {
+ setverdict(fail, "Primary/Secondary DNS PCO IPCP option not found");
+ } else {
+ setverdict(fail, "Primary/Secondary DNS PCO IPCP option found but not matching expected values");
+ }
}
f_pdp_ctx_del(ctx, '1'B);
}