phase0: add app skeleton, config cache, and precommit alias

This commit is contained in:
2026-03-13 18:56:23 +01:00
parent cc78558612
commit 5e478cd305
18 changed files with 281 additions and 5 deletions

View File

@@ -0,0 +1,15 @@
defmodule Parrhesia.ApplicationTest do
use ExUnit.Case, async: false
test "starts the core supervision tree" do
assert is_pid(Process.whereis(Parrhesia.Supervisor))
assert is_pid(Process.whereis(Parrhesia.Telemetry))
assert is_pid(Process.whereis(Parrhesia.Config))
assert is_pid(Process.whereis(Parrhesia.Storage.Supervisor))
assert is_pid(Process.whereis(Parrhesia.Subscriptions.Supervisor))
assert is_pid(Process.whereis(Parrhesia.Auth.Supervisor))
assert is_pid(Process.whereis(Parrhesia.Policy.Supervisor))
assert is_pid(Process.whereis(Parrhesia.Web.Endpoint))
assert is_pid(Process.whereis(Parrhesia.Tasks.Supervisor))
end
end

View File

@@ -0,0 +1,14 @@
defmodule Parrhesia.ConfigTest do
use ExUnit.Case, async: true
test "returns configured relay limits/policies/features" do
assert Parrhesia.Config.get([:limits, :max_frame_bytes]) == 1_048_576
assert Parrhesia.Config.get([:limits, :max_event_bytes]) == 262_144
assert Parrhesia.Config.get([:policies, :auth_required_for_writes]) == false
assert Parrhesia.Config.get([:features, :nip_ee_mls]) == false
end
test "returns default for unknown keys" do
assert Parrhesia.Config.get([:limits, :unknown_limit], :missing) == :missing
end
end