diff options
author | ILYA Khlopotov <iilyak@apache.org> | 2017-07-18 08:17:47 -0700 |
---|---|---|
committer | ILYA Khlopotov <iilyak@apache.org> | 2017-07-18 08:28:23 -0700 |
commit | 3523bab304cc031b9fcc150080ff539d9f76dabb (patch) | |
tree | e3b29ac592591634dade7122d51c7adfbe209da6 | |
parent | 860f23cb57e0af84b668609676ba93c5edb769d5 (diff) | |
download | couchdb-3523bab304cc031b9fcc150080ff539d9f76dabb.tar.gz |
Rename unused variables
COUCHDB-3367
-rw-r--r-- | src/chttpd/test/chttpd_security_tests.erl | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/src/chttpd/test/chttpd_security_tests.erl b/src/chttpd/test/chttpd_security_tests.erl index 009f22fc8..4c2f973d5 100644 --- a/src/chttpd/test/chttpd_security_tests.erl +++ b/src/chttpd/test/chttpd_security_tests.erl @@ -51,18 +51,16 @@ setup() -> [Url, UsersUrl]. teardown([Url,UsersUrl]) -> - Addr = config:get("chttpd", "bind_address", "127.0.0.1"), - Port = mochiweb_socket_server:get(chttpd, port), delete_db(Url), delete_db(UsersUrl), ok = config:delete("admins", ?USER, _Persist=false). create_db(Url) -> - {ok, Status, _, Body} = test_request:put(Url, [?CONTENT_JSON, ?AUTH], "{}"), + {ok, Status, _, _} = test_request:put(Url, [?CONTENT_JSON, ?AUTH], "{}"), ?assert(Status =:= 201 orelse Status =:= 202). create_design_doc(Url) -> - {ok, Status, _, _} = test_request:put(lists:concat([Url, '/_design/test']), [?CONTENT_JSON, ?AUTH], + {ok, Status, _, _} = test_request:put(lists:concat([Url, '/_design/test']), [?CONTENT_JSON, ?AUTH], "{\"id\":\"_design/test\"}"), ?assert(Status =:= 201 orelse Status =:= 202). @@ -113,7 +111,7 @@ all_test_() -> } }. -should_allow_admin_db_compaction([Url,UsersUrl]) -> +should_allow_admin_db_compaction([Url,_UsersUrl]) -> ?_assertEqual(true, begin {ok, _, _, ResultBody} = test_request:post(Url ++ "/_compact", @@ -123,7 +121,7 @@ should_allow_admin_db_compaction([Url,UsersUrl]) -> couch_util:get_value(<<"ok">>, InnerJson, undefined) end). -should_disallow_anonymous_db_compaction([Url,UsersUrl]) -> +should_disallow_anonymous_db_compaction([Url,_UsersUrl]) -> {ok, _, _, ResultBody} = test_request:post(Url ++ "/_compact", [?CONTENT_JSON], ""), ResultJson = ?JSON_DECODE(ResultBody), @@ -131,7 +129,7 @@ should_disallow_anonymous_db_compaction([Url,UsersUrl]) -> ErrType = couch_util:get_value(<<"error">>, InnerJson), ?_assertEqual(<<"unauthorized">>,ErrType). -should_disallow_db_member_db_compaction([Url,UsersUrl]) -> +should_disallow_db_member_db_compaction([Url,_UsersUrl]) -> {ok, _, _, ResultBody} = test_request:post(Url ++ "/_compact", [?CONTENT_JSON, ?TEST_MEMBER_AUTH], ""), ResultJson = ?JSON_DECODE(ResultBody), @@ -139,7 +137,7 @@ should_disallow_db_member_db_compaction([Url,UsersUrl]) -> ErrType = couch_util:get_value(<<"error">>, InnerJson), ?_assertEqual(<<"unauthorized">>,ErrType). -should_allow_db_admin_db_compaction([Url,UsersUrl]) -> +should_allow_db_admin_db_compaction([Url,_UsersUrl]) -> ?_assertEqual(true, begin {ok, _, _, ResultBody} = test_request:post(Url ++ "/_compact", @@ -149,7 +147,7 @@ should_allow_db_admin_db_compaction([Url,UsersUrl]) -> couch_util:get_value(<<"ok">>, InnerJson, undefined) end). -should_allow_admin_view_compaction([Url,UsersUrl]) -> +should_allow_admin_view_compaction([Url,_UsersUrl]) -> ?_assertEqual(true, begin {ok, _, _, ResultBody} = test_request:post(Url ++ "/_compact/test", @@ -159,7 +157,7 @@ should_allow_admin_view_compaction([Url,UsersUrl]) -> couch_util:get_value(<<"ok">>, InnerJson, undefined) end). -should_disallow_anonymous_view_compaction([Url,UsersUrl]) -> +should_disallow_anonymous_view_compaction([Url,_UsersUrl]) -> {ok, _, _, ResultBody} = test_request:post(Url ++ "/_compact/test", [?CONTENT_JSON], ""), ResultJson = ?JSON_DECODE(ResultBody), @@ -167,7 +165,7 @@ should_disallow_anonymous_view_compaction([Url,UsersUrl]) -> ErrType = couch_util:get_value(<<"error">>, InnerJson), ?_assertEqual(<<"unauthorized">>,ErrType). -should_allow_admin_db_view_cleanup([Url,UsersUrl]) -> +should_allow_admin_db_view_cleanup([Url,_UsersUrl]) -> ?_assertEqual(true, begin {ok, _, _, ResultBody} = test_request:post(Url ++ "/_view_cleanup", @@ -177,7 +175,7 @@ should_allow_admin_db_view_cleanup([Url,UsersUrl]) -> couch_util:get_value(<<"ok">>, InnerJson, undefined) end). -should_disallow_anonymous_db_view_cleanup([Url,UsersUrl]) -> +should_disallow_anonymous_db_view_cleanup([Url,_UsersUrl]) -> {ok, _, _, ResultBody} = test_request:post(Url ++ "/_view_cleanup", [?CONTENT_JSON], ""), ResultJson = ?JSON_DECODE(ResultBody), |