diff options
| author | Michael Klishin <michael@clojurewerkz.org> | 2019-11-15 07:15:23 +0300 |
|---|---|---|
| committer | Michael Klishin <michael@clojurewerkz.org> | 2019-11-15 07:15:23 +0300 |
| commit | 53ab5c17ddd11a5718fc0d229070674f8722679b (patch) | |
| tree | 41619f847d4b443209e9b2a2b9353bdf6417a4ce /test | |
| parent | 1648c5a9c9f38cf002d91366281c97394b549730 (diff) | |
| download | rabbitmq-server-git-53ab5c17ddd11a5718fc0d229070674f8722679b.tar.gz | |
Definition import: refactor for future ctl command
Diffstat (limited to 'test')
| -rw-r--r-- | test/definition_import_SUITE.erl | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/test/definition_import_SUITE.erl b/test/definition_import_SUITE.erl index 2f70832bae..072e1f704d 100644 --- a/test/definition_import_SUITE.erl +++ b/test/definition_import_SUITE.erl @@ -135,8 +135,9 @@ run_directory_import_case(Path, Expected) -> run_import_case(Path) -> {ok, Body} = file:read_file(Path), ct:pal("Successfully loaded a definition to import from ~p~n", [Path]), - rabbit_definitions:apply_defs(Body, ?INTERNAL_USER, - fun () -> ct:pal("Import case ~p succeeded~n", [Path]) end, - fun (E) -> ct:pal("Import case ~p failed: ~p~n", [Path, E]), - ct:fail({failure, Path, E}) - end). + case rabbit_definitions:import_definitions(Body) of + ok -> ok; + {error, E} -> + ct:pal("Import case ~p failed: ~p~n", [Path, E]), + ct:fail({failure, Path, E}) + end. |
