phase0: add app skeleton, config cache, and precommit alias
This commit is contained in:
15
test/parrhesia/application_test.exs
Normal file
15
test/parrhesia/application_test.exs
Normal 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
|
||||
14
test/parrhesia/config_test.exs
Normal file
14
test/parrhesia/config_test.exs
Normal 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
|
||||
Reference in New Issue
Block a user