|
16 | 16 |
|
17 | 17 |
|
18 | 18 | setup(PortType) -> |
19 | | - ok = config:set("admins", "rocko", "artischocko", false), |
| 19 | + Hashed = couch_passwords:hash_admin_password("artischocko"), |
| 20 | + ok = config:set("admins", "rocko", binary_to_list(Hashed), _Persist=false), |
20 | 21 | Addr = config:get("httpd", "bind_address", "127.0.0.1"), |
21 | 22 | lists:concat(["http://", Addr, ":", port(PortType), "/_session"]). |
22 | 23 |
|
@@ -51,7 +52,8 @@ make_test_cases(Mod, Funs) -> |
51 | 52 | should_return_username_on_post_to_session(_PortType, Url) -> |
52 | 53 | ?_assertEqual(<<"rocko">>, |
53 | 54 | begin |
54 | | - ok = config:set("admins", "rocko", "artischocko", false), |
| 55 | + Hashed = couch_passwords:hash_admin_password(<<"artischocko">>), |
| 56 | + ok = config:set("admins", "rocko", binary_to_list(Hashed), false), |
55 | 57 | {ok, _, _, Body} = test_request:post(Url, [{"Content-Type", "application/json"}], |
56 | 58 | "{\"name\":\"rocko\", \"password\":\"artischocko\"}"), |
57 | 59 | {Json} = jiffy:decode(Body), |
|
0 commit comments