Files
self 6caccf23a6 feat: add scheduler probe fixture
Add supertest scheduler cron workers and local API endpoints that record singleton and all-nodes scheduler executions into synced supertest cases.\n\nThe probe API lets live supertest scenarios start, inspect, and stop scheduler assertions without adding a separate resource.
2026-05-28 16:50:50 +02:00

22 lines
774 B
Elixir

defmodule TribeOne.TribesPlugin.Supertest.SchedulerContractTest do
use ExUnit.Case, async: true
test "declares scheduler probe cron workers" do
spec = TribeOne.TribesPlugin.Supertest.Plugin.register(%{})
crons = Map.fetch!(spec, :scheduler_crons)
assert Enum.any?(crons, fn cron ->
cron.id == "scheduler.singleton_counter" and
cron.mode == :singleton and
cron.worker == TribeOne.TribesPlugin.Supertest.Scheduler.SingletonCounterWorker
end)
assert Enum.any?(crons, fn cron ->
cron.id == "scheduler.all_nodes_counter" and
cron.mode == :all_nodes and
cron.worker == TribeOne.TribesPlugin.Supertest.Scheduler.AllNodesCounterWorker
end)
end
end