osmith has uploaded this change for review. (
https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/37102?usp=email )
Change subject: test/s1ap_proxy_test: minor/cosmetic improvements
......................................................................
test/s1ap_proxy_test: minor/cosmetic improvements
Change-Id: I91650bef356b4010d16de9c708381ef8de14fe85
---
M test/s1ap_proxy_test.erl
1 file changed, 18 insertions(+), 8 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/erlang/osmo-s1gw refs/changes/02/37102/1
diff --git a/test/s1ap_proxy_test.erl b/test/s1ap_proxy_test.erl
index 0c4bbbf..2bc8392 100644
--- a/test/s1ap_proxy_test.erl
+++ b/test/s1ap_proxy_test.erl
@@ -2,6 +2,9 @@
-include_lib("eunit/include/eunit.hrl").
+-define(EXP_ADDR_STR, "127.0.0.1").
+-define(EXP_ADDR_BIN, << 16#7f, 16#00, 16#00, 16#01 >>).
+
%% ------------------------------------------------------------------
%% testcases
%% ------------------------------------------------------------------
@@ -20,7 +23,7 @@
?assertEqual(OrigData, s1ap_proxy:handle_pdu(OrigData)).
-%% E-RAB SETUP REQUEST
+%% [eNB -> MME] E-RAB SETUP REQUEST
e_rab_setup_req_pdu(TLA, TEID) when is_binary(TLA),
is_binary(TEID) ->
<< 16#00, 16#05, 16#00, 16#80, 16#9b, 16#00, 16#00, 16#03,
@@ -54,14 +57,13 @@
OrigData = e_rab_setup_req_pdu(OrigTLA, TEID),
%% Expected output data
- ExpTLA = << 16#7f, 16#00, 16#00, 16#01 >>,
- ExpData = e_rab_setup_req_pdu(ExpTLA, TEID),
+ ExpData = e_rab_setup_req_pdu(?EXP_ADDR_BIN, TEID),
- application:set_env(osmo_s1gw, mme_loc_addr, "127.0.0.1"),
+ application:set_env(osmo_s1gw, mme_loc_addr, ?EXP_ADDR_STR),
?assertEqual(ExpData, s1ap_proxy:handle_pdu(OrigData)).
-%% E-RAB SETUP RESPONSE
+%% [MME -> eNB] E-RAB SETUP RESPONSE
e_rab_setup_rsp_pdu(TLA, TEID) when is_binary(TLA),
is_binary(TEID) ->
<< 16#20, 16#05, 16#00, 16#22, 16#00, 16#00, 16#03, 16#00,
@@ -79,10 +81,9 @@
OrigData = e_rab_setup_rsp_pdu(OrigTLA, TEID),
%% Expected output data
- ExpTLA = << 16#7f, 16#00, 16#00, 16#01 >>,
- ExpData = e_rab_setup_rsp_pdu(ExpTLA, TEID),
+ ExpData = e_rab_setup_rsp_pdu(?EXP_ADDR_BIN, TEID),
- application:set_env(osmo_s1gw, s1gw_bind_addr, "127.0.0.1"),
+ application:set_env(osmo_s1gw, s1gw_bind_addr, ?EXP_ADDR_STR),
?assertEqual(ExpData, s1ap_proxy:handle_pdu(OrigData)).
%% vim:set ts=4 sw=4 et:
--
To view, visit
https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/37102?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: erlang/osmo-s1gw
Gerrit-Branch: master
Gerrit-Change-Id: I91650bef356b4010d16de9c708381ef8de14fe85
Gerrit-Change-Number: 37102
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: newchange