Merge branch 'more-test-fixes' into 'develop'
More test fixes See merge request pleroma/pleroma!3984
This commit is contained in:
commit
2656199dc7
|
@ -6,7 +6,7 @@ variables: &global_variables
|
||||||
POSTGRES_USER: postgres
|
POSTGRES_USER: postgres
|
||||||
POSTGRES_PASSWORD: postgres
|
POSTGRES_PASSWORD: postgres
|
||||||
DB_HOST: postgres
|
DB_HOST: postgres
|
||||||
DB_PORT: 5432
|
DB_PORT: "5432"
|
||||||
MIX_ENV: test
|
MIX_ENV: test
|
||||||
|
|
||||||
workflow:
|
workflow:
|
||||||
|
|
|
@ -17,6 +17,8 @@ def list_behaviour_implementations(behaviour) do
|
||||||
# This shouldn't be needed as all modules are expected to have module_info/1,
|
# This shouldn't be needed as all modules are expected to have module_info/1,
|
||||||
# but in test enviroments some transient modules `:elixir_compiler_XX`
|
# but in test enviroments some transient modules `:elixir_compiler_XX`
|
||||||
# are loaded for some reason (where XX is a random integer).
|
# are loaded for some reason (where XX is a random integer).
|
||||||
|
Code.ensure_loaded(module)
|
||||||
|
|
||||||
if function_exported?(module, :module_info, 1) do
|
if function_exported?(module, :module_info, 1) do
|
||||||
module.module_info(:attributes)
|
module.module_info(:attributes)
|
||||||
|> Keyword.get_values(:behaviour)
|
|> Keyword.get_values(:behaviour)
|
||||||
|
|
|
@ -54,6 +54,8 @@ defmodule Pleroma.Web.ActivityPub.MRF do
|
||||||
@required_description_keys [:key, :related_policy]
|
@required_description_keys [:key, :related_policy]
|
||||||
|
|
||||||
def filter_one(policy, message) do
|
def filter_one(policy, message) do
|
||||||
|
Code.ensure_loaded(policy)
|
||||||
|
|
||||||
should_plug_history? =
|
should_plug_history? =
|
||||||
if function_exported?(policy, :history_awareness, 0) do
|
if function_exported?(policy, :history_awareness, 0) do
|
||||||
policy.history_awareness()
|
policy.history_awareness()
|
||||||
|
@ -188,6 +190,8 @@ def config_descriptions do
|
||||||
|
|
||||||
def config_descriptions(policies) do
|
def config_descriptions(policies) do
|
||||||
Enum.reduce(policies, @mrf_config_descriptions, fn policy, acc ->
|
Enum.reduce(policies, @mrf_config_descriptions, fn policy, acc ->
|
||||||
|
Code.ensure_loaded(policy)
|
||||||
|
|
||||||
if function_exported?(policy, :config_description, 0) do
|
if function_exported?(policy, :config_description, 0) do
|
||||||
description =
|
description =
|
||||||
@default_description
|
@default_description
|
||||||
|
|
Loading…
Reference in New Issue