summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Sébastien Pédron <jean-sebastien@rabbitmq.com>2020-08-10 14:39:55 +0200
committerJean-Sébastien Pédron <jean-sebastien@rabbitmq.com>2020-08-10 14:39:55 +0200
commit9b905fca3f9e0170d0410f31f8144034bd22e898 (patch)
tree84aaec141dfccdc5df41416f5121f4fb8e1d80a6
parenta82711b192446c7894ff3d66ab09205d190c8214 (diff)
downloadrabbitmq-server-git-9b905fca3f9e0170d0410f31f8144034bd22e898.tar.gz
feature_flags_SUITE: Use rabbit_file:recursive_*() to manage test plugin
Plugins can be packaged as .ez archives or directories, and the latter is the default now. The `file:copy()` and `file:delete()` functions don't work with directories obviously.
-rw-r--r--test/feature_flags_SUITE.erl7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/feature_flags_SUITE.erl b/test/feature_flags_SUITE.erl
index fe0731d088..29dfcf068b 100644
--- a/test/feature_flags_SUITE.erl
+++ b/test/feature_flags_SUITE.erl
@@ -1061,8 +1061,9 @@ list_my_plugin_plugins(PluginSrcDir) ->
end, Files).
remove_other_plugins(PluginSrcDir, OtherPlugins) ->
- [ok = file:delete(filename:join(PluginSrcDir, Filename))
- || Filename <- OtherPlugins].
+ ok = rabbit_file:recursive_delete(
+ [filename:join(PluginSrcDir, OtherPlugin)
+ || OtherPlugin <- OtherPlugins]).
work_around_cli_and_rabbit_circular_dep(Config) ->
%% FIXME: We also need to copy `rabbit` in `my_plugins` plugins
@@ -1090,7 +1091,7 @@ work_around_cli_and_rabbit_circular_dep(Config) ->
?LOW_IMPORTANCE,
"Copy `~s` to `~s` to fix CLI erroneous "
"dependency on `rabbit`", [Path, Dest]),
- {ok, _} = file:copy(Path, Dest);
+ ok = rabbit_file:recursive_copy(Path, Dest);
false ->
ok
end