From 1781aace9857150b39ac8173024a4d0802f07a34 Mon Sep 17 00:00:00 2001 From: Graham McIntire Date: Tue, 17 Mar 2026 08:11:36 -0500 Subject: [PATCH] fix failing tests: ping check config and whitelist cache race (#55) - check_results_controller_test: add required config host for ping check - brute_force_protection_test: set async: false to avoid ETS cache race Reviewed-on: https://git.mcintire.me/graham/towerops-web/pulls/55 --- .../controllers/api/v1/check_results_controller_test.exs | 3 ++- test/towerops_web/plugs/brute_force_protection_test.exs | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/test/towerops_web/controllers/api/v1/check_results_controller_test.exs b/test/towerops_web/controllers/api/v1/check_results_controller_test.exs index 95ad3c81..24c002e5 100644 --- a/test/towerops_web/controllers/api/v1/check_results_controller_test.exs +++ b/test/towerops_web/controllers/api/v1/check_results_controller_test.exs @@ -54,7 +54,8 @@ defmodule ToweropsWeb.Api.V1.CheckResultsControllerTest do enabled: true, interval_seconds: 60, device_id: device.id, - organization_id: organization.id + organization_id: organization.id, + config: %{"host" => "10.0.0.1"} }) conn = get(conn, ~p"/api/v1/devices/#{device.id}/checks") diff --git a/test/towerops_web/plugs/brute_force_protection_test.exs b/test/towerops_web/plugs/brute_force_protection_test.exs index de56348e..f9e5293c 100644 --- a/test/towerops_web/plugs/brute_force_protection_test.exs +++ b/test/towerops_web/plugs/brute_force_protection_test.exs @@ -1,5 +1,5 @@ defmodule ToweropsWeb.Plugs.BruteForceProtectionTest do - use Towerops.DataCase, async: true + use Towerops.DataCase, async: false import Plug.Conn