diff options
| author | Jean-Sébastien Pédron <jean-sebastien@rabbitmq.com> | 2019-09-04 19:50:31 +0200 |
|---|---|---|
| committer | Jean-Sébastien Pédron <jean-sebastien@rabbitmq.com> | 2019-09-04 19:51:43 +0200 |
| commit | 651de5447f244cd4554fa0fea834ca2b51988ff5 (patch) | |
| tree | f87f3b478fee2a75cd5aa20eac80572358dadbd8 /test | |
| parent | c7a6100279f7fe609aa2ff488dfb177a91909930 (diff) | |
| download | rabbitmq-server-git-651de5447f244cd4554fa0fea834ca2b51988ff5.tar.gz | |
unit_inbroker_non_parallel_SUITE: Support `disk_monitor_enable` testcase on Windows
We simply add the output of `dir` to the testcase.
Diffstat (limited to 'test')
| -rw-r--r-- | test/unit_inbroker_non_parallel_SUITE.erl | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/test/unit_inbroker_non_parallel_SUITE.erl b/test/unit_inbroker_non_parallel_SUITE.erl index f006e0c717..c47ca91a55 100644 --- a/test/unit_inbroker_non_parallel_SUITE.erl +++ b/test/unit_inbroker_non_parallel_SUITE.erl @@ -682,15 +682,6 @@ disk_monitor_enable(Config) -> ?MODULE, disk_monitor_enable1, [Config]). disk_monitor_enable1(_Config) -> - case os:type() of - {unix, _} -> - disk_monitor_enable1(); - _ -> - %% skip windows testing - skipped - end. - -disk_monitor_enable1() -> ok = meck:new(rabbit_misc, [passthrough]), ok = meck:expect(rabbit_misc, os_cmd, fun(_) -> "\n" end), application:set_env(rabbit, disk_monitor_failure_retries, 20000), @@ -698,7 +689,19 @@ disk_monitor_enable1() -> ok = rabbit_sup:stop_child(rabbit_disk_monitor_sup), ok = rabbit_sup:start_delayed_restartable_child(rabbit_disk_monitor, [1000]), undefined = rabbit_disk_monitor:get_disk_free(), - Cmd = "Filesystem 1024-blocks Used Available Capacity iused ifree %iused Mounted on\n/dev/disk1 975798272 234783364 740758908 25% 58759839 185189727 24% /\n", + Cmd = case os:type() of + {win32, _} -> " Le volume dans le lecteur C n’a pas de nom.\n" + " Le numéro de série du volume est 707D-5BDC\n" + "\n" + " Répertoire de C:\Users\n" + "\n" + "10/12/2015 11:01 <DIR> .\n" + "10/12/2015 11:01 <DIR> ..\n" + " 0 fichier(s) 0 octets\n" + " 2 Rép(s) 758537121792 octets libres\n"; + _ -> "Filesystem 1024-blocks Used Available Capacity iused ifree %iused Mounted on\n" + "/dev/disk1 975798272 234783364 740758908 25% 58759839 185189727 24% /\n" + end, ok = meck:expect(rabbit_misc, os_cmd, fun(_) -> Cmd end), timer:sleep(1000), Bytes = 740758908 * 1024, |
