1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2019 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
5 defmodule Pleroma.HealthcheckTest do
7 alias Pleroma.Healthcheck
9 test "system_info/0" do
10 result = Healthcheck.system_info() |> Map.from_struct()
12 assert Map.keys(result) == [
22 describe "check_health/1" do
23 test "pool size equals active connections" do
24 result = Healthcheck.check_health(%Healthcheck{pool_size: 10, active: 10})
28 test "chech_health/1" do
29 result = Healthcheck.check_health(%Healthcheck{pool_size: 10, active: 9})