From 9a744d49c824e0a7d9963b00893fb2091e3ac4ab Mon Sep 17 00:00:00 2001 From: lain Date: Fri, 18 Dec 2020 17:44:19 +0100 Subject: Jason: Remove by now superfluous jason_types file --- config/config.exs | 1 - 1 file changed, 1 deletion(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index c7ac0d22c..77a1e606e 100644 --- a/config/config.exs +++ b/config/config.exs @@ -47,7 +47,6 @@ use Mix.Config config :pleroma, ecto_repos: [Pleroma.Repo] config :pleroma, Pleroma.Repo, - types: Pleroma.PostgresTypes, telemetry_event: [Pleroma.Repo.Instrumenter], migration_lock: nil -- cgit v1.2.3 From 95a9bdfc374a013be47e74b25bdba5d91f51948b Mon Sep 17 00:00:00 2001 From: lain Date: Fri, 18 Dec 2020 19:49:01 +0100 Subject: Tests: Use NullCache for async tests. Caching can't work in async tests, so for them it is mocked to a null cache that is always empty. Synchronous tests are stubbed with the real Cachex, which is emptied after every test. --- config/test.exs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'config') diff --git a/config/test.exs b/config/test.exs index 2a20a03e7..397bc688e 100644 --- a/config/test.exs +++ b/config/test.exs @@ -121,6 +121,8 @@ config :tzdata, :autoupdate, :disabled config :pleroma, :mrf, policies: [] +config :pleroma, :cachex, provider: Pleroma.CachexMock + if File.exists?("./config/test.secret.exs") do import_config "test.secret.exs" else -- cgit v1.2.3 From ecd39a8fe5adc8004e285c18ba52dffb638999d3 Mon Sep 17 00:00:00 2001 From: lain Date: Mon, 21 Dec 2020 12:31:12 +0100 Subject: Test config: Raise pool size for postgres. Given all the async tests, this can become a bottleneck. --- config/test.exs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'config') diff --git a/config/test.exs b/config/test.exs index 397bc688e..c4fd5c52f 100644 --- a/config/test.exs +++ b/config/test.exs @@ -47,7 +47,10 @@ config :pleroma, Pleroma.Repo, password: "postgres", database: "pleroma_test", hostname: System.get_env("DB_HOST") || "localhost", - pool: Ecto.Adapters.SQL.Sandbox + pool: Ecto.Adapters.SQL.Sandbox, + pool_size: 50 + +config :pleroma, :dangerzone, override_repo_pool_size: true # Reduce hash rounds for testing config :pbkdf2_elixir, rounds: 1 -- cgit v1.2.3 From 5db1e6c8d37ea114433afe0a9247314ab92cc52f Mon Sep 17 00:00:00 2001 From: lain Date: Wed, 16 Dec 2020 17:51:48 +0100 Subject: Pipeline test: Switch from Mock to Mox. Speeds up the test and makes it possible to run async. --- config/test.exs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'config') diff --git a/config/test.exs b/config/test.exs index c4fd5c52f..a85881592 100644 --- a/config/test.exs +++ b/config/test.exs @@ -124,6 +124,14 @@ config :tzdata, :autoupdate, :disabled config :pleroma, :mrf, policies: [] +config :pleroma, :pipeline, + object_validator: Pleroma.Web.ActivityPub.ObjectValidatorMock, + mrf: Pleroma.Web.ActivityPub.MRFMock, + activity_pub: Pleroma.Web.ActivityPub.ActivityPubMock, + side_effects: Pleroma.Web.ActivityPub.SideEffectsMock, + federator: Pleroma.Web.FederatorMock, + config: Pleroma.ConfigMock + config :pleroma, :cachex, provider: Pleroma.CachexMock if File.exists?("./config/test.secret.exs") do -- cgit v1.2.3