diff --git a/test/towerops/alerts/alert_notifier_test.exs b/test/towerops/alerts/alert_notifier_test.exs index 0cf11b1d..8f96f56b 100644 --- a/test/towerops/alerts/alert_notifier_test.exs +++ b/test/towerops/alerts/alert_notifier_test.exs @@ -1,5 +1,5 @@ defmodule Towerops.Alerts.AlertNotifierTest do - use Towerops.DataCase, async: false + use Towerops.DataCase, async: true import Swoosh.TestAssertions import Towerops.AccountsFixtures diff --git a/test/towerops/monitoring/supervisor_test.exs b/test/towerops/monitoring/supervisor_test.exs index d755b9b2..530a8792 100644 --- a/test/towerops/monitoring/supervisor_test.exs +++ b/test/towerops/monitoring/supervisor_test.exs @@ -1,12 +1,19 @@ defmodule Towerops.Monitoring.SupervisorTest do use Towerops.DataCase, async: false + import Mox import Towerops.AccountsFixtures + alias Towerops.Monitoring.PingMock alias Towerops.Monitoring.Supervisor, as: MonitoringSupervisor alias Towerops.Snmp.PollerRegistry + setup :verify_on_exit! + setup do + # Stub ping calls for any monitors that start during tests + # Allow any number of ping calls (monitors ping on init) + stub_with(PingMock, Towerops.Monitoring.PingStub) # Start Monitoring.Supervisor for these tests start_supervised!(MonitoringSupervisor)