aboutsummaryrefslogtreecommitdiffstats
path: root/lib/diameter/test
diff options
context:
space:
mode:
authorAnders Svensson <[email protected]>2017-07-08 00:48:07 +0200
committerAnders Svensson <[email protected]>2017-08-03 17:14:28 +0200
commit55e65b262cdf0b794ab443928676720a323cf6b0 (patch)
treefe4214afece02c79c2f48b2a10e11bdf20c364f4 /lib/diameter/test
parentdf12f634bec4b784f4c8d16846f2c24297b0e1ac (diff)
downloadotp-55e65b262cdf0b794ab443928676720a323cf6b0.tar.gz
otp-55e65b262cdf0b794ab443928676720a323cf6b0.tar.bz2
otp-55e65b262cdf0b794ab443928676720a323cf6b0.zip
Rename record_decode -> decode_format
{record_decode, map} is a bit too quirky.
Diffstat (limited to 'lib/diameter/test')
-rw-r--r--lib/diameter/test/diameter_codec_SUITE.erl2
-rw-r--r--lib/diameter/test/diameter_codec_SUITE_data/diameter_test_unknown.erl2
-rw-r--r--lib/diameter/test/diameter_codec_test.erl2
-rw-r--r--lib/diameter/test/diameter_traffic_SUITE.erl14
4 files changed, 10 insertions, 10 deletions
diff --git a/lib/diameter/test/diameter_codec_SUITE.erl b/lib/diameter/test/diameter_codec_SUITE.erl
index 31332537e9..c79b642c09 100644
--- a/lib/diameter/test/diameter_codec_SUITE.erl
+++ b/lib/diameter/test/diameter_codec_SUITE.erl
@@ -292,7 +292,7 @@ recode(Msg, Dict) ->
opts(Mod) ->
#{dictionary => Mod,
- record_decode => true,
+ decode_format => record,
string_decode => false,
strict_mbit => true,
rfc => 6733,
diff --git a/lib/diameter/test/diameter_codec_SUITE_data/diameter_test_unknown.erl b/lib/diameter/test/diameter_codec_SUITE_data/diameter_test_unknown.erl
index fe602c9ee5..735339ebb9 100644
--- a/lib/diameter/test/diameter_codec_SUITE_data/diameter_test_unknown.erl
+++ b/lib/diameter/test/diameter_codec_SUITE_data/diameter_test_unknown.erl
@@ -78,7 +78,7 @@ dec('BR', #diameter_packet
opts(Mod) ->
#{dictionary => Mod,
- record_decode => true,
+ decode_format => record,
string_decode => true,
strict_mbit => true,
rfc => 6733,
diff --git a/lib/diameter/test/diameter_codec_test.erl b/lib/diameter/test/diameter_codec_test.erl
index 7595e7edfc..22fb0550ea 100644
--- a/lib/diameter/test/diameter_codec_test.erl
+++ b/lib/diameter/test/diameter_codec_test.erl
@@ -219,7 +219,7 @@ opts(Mod) ->
dictionary => Mod}.
opts() ->
- #{record_decode => true,
+ #{decode_format => record,
string_decode => true,
strict_mbit => true,
rfc => 6733,
diff --git a/lib/diameter/test/diameter_traffic_SUITE.erl b/lib/diameter/test/diameter_traffic_SUITE.erl
index adf8bf4d66..aa0098ccd6 100644
--- a/lib/diameter/test/diameter_traffic_SUITE.erl
+++ b/lib/diameter/test/diameter_traffic_SUITE.erl
@@ -142,8 +142,8 @@
%% How to construct outgoing messages.
-define(ENCODINGS, [list, record, map]).
-%% How to set record_decode.
--define(DECODINGS, [true, false, map, list]).
+%% How to decode incoming messages.
+-define(DECODINGS, [record, false, map, list]).
%% How to send answers, in a diameter_packet or not.
-define(CONTAINERS, [pkt, msg]).
@@ -462,7 +462,7 @@ start_services(Config) ->
server_service = SN,
server_decoding = SD}
= group(Config),
- ok = diameter:start_service(SN, [{record_decode, SD}
+ ok = diameter:start_service(SN, [{decode_format, SD}
| ?SERVICE(SN, S)]),
ok = diameter:start_service(CN, [{sequence, ?CLIENT_MASK}
| ?SERVICE(CN, S)]).
@@ -1065,11 +1065,11 @@ origin(N) ->
%% Map atoms. The atoms are part of (constructed) group names, so it's
%% good that they're readable.
-decode(true) -> 0; %% record
+decode(record) -> 0;
decode(list) -> 1;
decode(map) -> 2;
decode(false) -> 3;
-decode(0) -> true;
+decode(0) -> record;
decode(1) -> list;
decode(2) -> map;
decode(3) -> false.
@@ -1113,14 +1113,14 @@ to_map(map, #diameter_packet{msg = Msg})
to_map(list, #diameter_packet{msg = [MsgName | Avps]}) ->
maps:put(':name', MsgName, maps:from_list(Avps));
-to_map(true, #diameter_packet{header = H, msg = Rec}) ->
+to_map(record, #diameter_packet{header = H, msg = Rec}) ->
rec_to_map(Rec, dict(H));
%% No record decode: do it ourselves.
to_map(false, #diameter_packet{header = H,
msg = false,
bin = Bin}) ->
- Opts = #{record_decode => map,
+ Opts = #{decode_format => map,
string_decode => false,
strict_mbit => true,
rfc => 6733},