1 defmodule Pleroma.HealthcheckTest do
3 alias Pleroma.Healthcheck
5 test "system_info/0" do
6 result = Healthcheck.system_info() |> Map.from_struct()
8 assert Map.keys(result) == [:active, :healthy, :idle, :memory_used, :pool_size]
11 describe "check_health/1" do
12 test "pool size equals active connections" do
13 result = Healthcheck.check_health(%Healthcheck{pool_size: 10, active: 10})
17 test "chech_health/1" do
18 result = Healthcheck.check_health(%Healthcheck{pool_size: 10, active: 9})