diff options
author | Alexander Strizhakov <alex.strizhakov@gmail.com> | 2020-07-16 19:57:27 +0300 |
---|---|---|
committer | Alexander Strizhakov <alex.strizhakov@gmail.com> | 2021-05-11 18:12:33 +0300 |
commit | 2538c741c0d1bf9c2d9c8e02953d3d6e63220e8f (patch) | |
tree | 85139b44fc541482a2d923985bff58f1c2ccbdb7 /test/support/data_case.ex | |
parent | 745375bdcf2679ff803dd4ebc4a8313a7b5fb157 (diff) | |
download | pleroma-feature/config-versioning.tar.gz |
config versioningfeature/config-versioning
- added DynamicSupervisor, which starts Pleroma deps and restarts config dependent deps
- added versioning for in database config. New version is created from
changes which are passed to config update/delete endpoint. Every version
contains backup with all changes added through update. Versioning
supports rollbacks with N steps. With a rollback, all versions that
come after the version on which the rollback was made are deleted.
Diffstat (limited to 'test/support/data_case.ex')
-rw-r--r-- | test/support/data_case.ex | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/test/support/data_case.ex b/test/support/data_case.ex index 0ee2aa4a2..d4998a79c 100644 --- a/test/support/data_case.ex +++ b/test/support/data_case.ex @@ -48,19 +48,11 @@ defmodule Pleroma.DataCase do end def clear_cachex do - Pleroma.Supervisor - |> Supervisor.which_children() - |> Enum.each(fn - {name, _, _, [Cachex]} -> - name - |> to_string - |> String.trim_leading("cachex_") - |> Kernel.<>("_cache") - |> String.to_existing_atom() - |> Cachex.clear() - - _ -> - nil + Pleroma.Application.StartUpDependencies.cachex_deps() + |> Enum.each(fn {name, _} -> + "#{name}_cache" + |> String.to_existing_atom() + |> Cachex.clear() end) end |