|
| 1 | +%% This Source Code Form is subject to the terms of the Mozilla Public |
| 2 | +%% License, v. 2.0. If a copy of the MPL was not distributed with this |
| 3 | +%% file, You can obtain one at https://mozilla.org/MPL/2.0/. |
| 4 | +%% |
| 5 | +%% Copyright (c) 2011-2023 VMware, Inc. or its affiliates. All rights reserved. |
| 6 | +%% |
| 7 | + |
| 8 | +-module(unit_password_hashing_SUITE). |
| 9 | + |
| 10 | +-compile(export_all). |
| 11 | + |
| 12 | +all() -> [password_hashing]. |
| 13 | + |
| 14 | +%% ------------------------------------------------------------------- |
| 15 | +%% Testsuite setup/teardown |
| 16 | +%% ------------------------------------------------------------------- |
| 17 | + |
| 18 | +init_per_suite(Config) -> Config. |
| 19 | +end_per_suite(Config) -> Config. |
| 20 | + |
| 21 | +init_per_group(_Group, Config) -> Config. |
| 22 | +end_per_group(_Group, Config) -> Config. |
| 23 | + |
| 24 | +init_per_testcase(_Testcase, Config) -> Config. |
| 25 | +end_per_testcase(_Testcase, Config) -> Config. |
| 26 | + |
| 27 | +%% --------------------------------------------------------------------------- |
| 28 | +%% Test Cases |
| 29 | +%% --------------------------------------------------------------------------- |
| 30 | + |
| 31 | +password_hashing(_Config) -> |
| 32 | + rabbit_password_hashing_sha256 = rabbit_password:hashing_mod(), |
| 33 | + application:set_env(rabbit, password_hashing_module, |
| 34 | + rabbit_password_hashing_md5), |
| 35 | + rabbit_password_hashing_md5 = rabbit_password:hashing_mod(), |
| 36 | + application:set_env(rabbit, password_hashing_module, |
| 37 | + rabbit_password_hashing_sha256), |
| 38 | + rabbit_password_hashing_sha256 = rabbit_password:hashing_mod(), |
| 39 | + |
| 40 | + rabbit_password_hashing_sha256 = |
| 41 | + rabbit_password:hashing_mod(rabbit_password_hashing_sha256), |
| 42 | + rabbit_password_hashing_md5 = |
| 43 | + rabbit_password:hashing_mod(rabbit_password_hashing_md5), |
| 44 | + rabbit_password_hashing_md5 = |
| 45 | + rabbit_password:hashing_mod(undefined), |
| 46 | + |
| 47 | + passed. |
0 commit comments