aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2017-10-31 15:04:00 +0000
committerLoïc Hoguin <[email protected]>2017-10-31 15:04:00 +0000
commita97640d56dcb1a32ea44cb3be6575d2a4d6136c9 (patch)
treef80a72668727e850beaab14c46e935e4df247bd3 /test
parent217fac7f4414f5ff5eda85079a179e2462aba61c (diff)
downloadcowboy-a97640d56dcb1a32ea44cb3be6575d2a4d6136c9.tar.gz
cowboy-a97640d56dcb1a32ea44cb3be6575d2a4d6136c9.tar.bz2
cowboy-a97640d56dcb1a32ea44cb3be6575d2a4d6136c9.zip
Add informational responses to metrics
Diffstat (limited to 'test')
-rw-r--r--test/metrics_SUITE.erl23
1 files changed, 18 insertions, 5 deletions
diff --git a/test/metrics_SUITE.erl b/test/metrics_SUITE.erl
index d41ae1d..1883014 100644
--- a/test/metrics_SUITE.erl
+++ b/test/metrics_SUITE.erl
@@ -143,7 +143,8 @@ do_get(Path, Config) ->
pid := From,
streamid := 1,
reason := normal,
- req := #{}
+ req := #{},
+ informational := []
} = Metrics,
%% All good!
ok
@@ -205,7 +206,8 @@ post_body(Config) ->
pid := From,
streamid := 1,
reason := normal,
- req := #{}
+ req := #{},
+ informational := []
} = Metrics,
%% All good!
ok
@@ -261,7 +263,8 @@ no_resp_body(Config) ->
pid := From,
streamid := 1,
reason := normal,
- req := #{}
+ req := #{},
+ informational := []
} = Metrics,
%% All good!
ok
@@ -353,7 +356,7 @@ do_ws(Config) ->
%% is called. We therefore only check when it spawned.
#{procs := Procs} = Metrics,
[{_, #{
- spawn := ProcSpawn
+ spawn := _
}}] = maps:to_list(Procs),
%% Confirm other metadata are as expected.
#{
@@ -361,7 +364,17 @@ do_ws(Config) ->
pid := From,
streamid := 1,
reason := switch_protocol,
- req := #{}
+ req := #{},
+ %% A 101 upgrade response was sent.
+ informational := [#{
+ status := 101,
+ headers := #{
+ <<"connection">> := <<"Upgrade">>,
+ <<"upgrade">> := <<"websocket">>,
+ <<"sec-websocket-accept">> := _
+ },
+ time := _
+ }]
} = Metrics,
%% All good!
ok