aboutsummaryrefslogtreecommitdiffstats
path: root/test/old_http_SUITE_data/rest_resource_etags.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2018-11-22 00:12:18 +0100
committerLoïc Hoguin <[email protected]>2018-11-22 00:12:18 +0100
commit0223f69fcd2252a4b686b2815e6ee287b1484551 (patch)
treeadc934ca725cd23d7e7a76514ae732bbc62c3cac /test/old_http_SUITE_data/rest_resource_etags.erl
parent037b286aa85acaaf439011bd7d2ae38685ce2f2e (diff)
downloadcowboy-0223f69fcd2252a4b686b2815e6ee287b1484551.tar.gz
cowboy-0223f69fcd2252a4b686b2815e6ee287b1484551.tar.bz2
cowboy-0223f69fcd2252a4b686b2815e6ee287b1484551.zip
Move the final old HTTP suite tests and remove it
Diffstat (limited to 'test/old_http_SUITE_data/rest_resource_etags.erl')
-rw-r--r--test/old_http_SUITE_data/rest_resource_etags.erl37
1 files changed, 0 insertions, 37 deletions
diff --git a/test/old_http_SUITE_data/rest_resource_etags.erl b/test/old_http_SUITE_data/rest_resource_etags.erl
deleted file mode 100644
index 25b3080..0000000
--- a/test/old_http_SUITE_data/rest_resource_etags.erl
+++ /dev/null
@@ -1,37 +0,0 @@
--module(rest_resource_etags).
-
--export([init/2]).
--export([generate_etag/2]).
--export([content_types_provided/2]).
--export([get_text_plain/2]).
-
-init(Req, Opts) ->
- {cowboy_rest, Req, Opts}.
-
-generate_etag(Req, State) ->
- #{type := Type} = cowboy_req:match_qs([type], Req),
- case Type of
- %% Correct return values from generate_etag/2.
- <<"tuple-weak">> ->
- {{weak, <<"etag-header-value">>}, Req, State};
- <<"tuple-strong">> ->
- {{strong, <<"etag-header-value">>}, Req, State};
- %% Backwards compatible return values from generate_etag/2.
- <<"binary-weak-quoted">> ->
- {<<"W/\"etag-header-value\"">>, Req, State};
- <<"binary-strong-quoted">> ->
- {<<"\"etag-header-value\"">>, Req, State};
- %% Invalid return values from generate_etag/2.
- <<"binary-strong-unquoted">> ->
- ct_helper_error_h:ignore(cow_http_hd, parse_etag, 1),
- {<<"etag-header-value">>, Req, State};
- <<"binary-weak-unquoted">> ->
- ct_helper_error_h:ignore(cow_http_hd, parse_etag, 1),
- {<<"W/etag-header-value">>, Req, State}
- end.
-
-content_types_provided(Req, State) ->
- {[{{<<"text">>, <<"plain">>, []}, get_text_plain}], Req, State}.
-
-get_text_plain(Req, State) ->
- {<<"This is REST!">>, Req, State}.