- giro_client: remove verify: :verify_none, default to OTP :verify_peer - map_live: validate recovered_band against BandConfig and recovered_time against time_in_window?/2 to prevent stale-state breakage - prom_ex: local fork of Plugins.Phoenix that normalizes transport tag values to prevent telemetry_metrics_prometheus_core dropping series
33 lines
1 KiB
Elixir
33 lines
1 KiB
Elixir
defmodule Microwaveprop.PromExTest do
|
|
use ExUnit.Case, async: true
|
|
|
|
describe "dashboards/0" do
|
|
test "returns the configured dashboard list" do
|
|
dashboards = Microwaveprop.PromEx.dashboards()
|
|
assert Enum.any?(dashboards)
|
|
assert {:prom_ex, "application.json"} in dashboards
|
|
end
|
|
end
|
|
|
|
describe "plugins/0" do
|
|
test "includes the custom InstrumentPlugin alongside the PromEx defaults" do
|
|
plugins = Microwaveprop.PromEx.plugins()
|
|
assert Enum.any?(plugins)
|
|
assert Microwaveprop.PromEx.InstrumentPlugin in plugins
|
|
assert PromEx.Plugins.Beam in plugins
|
|
end
|
|
|
|
test "uses the local Phoenix plugin fork instead of the built-in" do
|
|
plugins = Microwaveprop.PromEx.plugins()
|
|
|
|
plugin_modules =
|
|
Enum.map(plugins, fn
|
|
{mod, _opts} when is_atom(mod) -> mod
|
|
mod when is_atom(mod) -> mod
|
|
end)
|
|
|
|
refute PromEx.Plugins.Phoenix in plugin_modules
|
|
assert Microwaveprop.PromEx.Plugins.Phoenix in plugin_modules
|
|
end
|
|
end
|
|
end
|