Skip to content

Commit 2d67486

Browse files
committed
unit_inbroker_non_parallel_SUITE: Adapt log_file_fails_to_initialise_during_startup to Windows
USe `C:\Windows` as the non-writable directory there.
1 parent 97a08d2 commit 2d67486

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

test/unit_inbroker_non_parallel_SUITE.erl

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -326,8 +326,12 @@ log_file_fails_to_initialise_during_startup1(_Config) ->
326326
%% write permissions
327327
ok = rabbit:stop(),
328328

329+
NonWritableDir = case os:type() of
330+
{win32, _} -> "C:/Windows";
331+
_ -> "/var/empty"
332+
end,
329333
Run1 = fun() ->
330-
NoPermission1 = "/var/empty/test.log",
334+
NoPermission1 = filename:join(NonWritableDir, "test.log"),
331335
delete_file(NoPermission1),
332336
delete_file(filename:dirname(NoPermission1)),
333337
ok = rabbit:stop(),
@@ -347,7 +351,7 @@ log_file_fails_to_initialise_during_startup1(_Config) ->
347351

348352
%% start application with logging to a subdirectory which
349353
%% parent directory has no write permissions
350-
NoPermission2 = "/var/empty/non-existent/test.log",
354+
NoPermission2 = filename:join(NonWritableDir, "non-existent/test.log"),
351355

352356
Run2 = fun() ->
353357
delete_file(NoPermission2),

0 commit comments

Comments
 (0)