Fix unused import warning in agent_live_test.exs

Change from fully-qualified Ecto.Query.from() calls to using
the imported from() macro directly to eliminate unused import
warning.
This commit is contained in:
Graham McIntire 2026-01-13 08:48:42 -06:00
parent 0689fec38c
commit b35071d106
No known key found for this signature in database

View file

@ -95,7 +95,7 @@ defmodule ToweropsWeb.AgentLiveTest do
Agents.update_agent_token_heartbeat(agent_token.id, "127.0.0.1")
Towerops.Repo.update_all(
Ecto.Query.from(t in Agents.AgentToken, where: t.id == ^agent_token.id),
from(t in Agents.AgentToken, where: t.id == ^agent_token.id),
set: [last_seen_at: three_minutes_ago]
)
@ -114,7 +114,7 @@ defmodule ToweropsWeb.AgentLiveTest do
Agents.update_agent_token_heartbeat(agent_token.id, "127.0.0.1")
Towerops.Repo.update_all(
Ecto.Query.from(t in Agents.AgentToken, where: t.id == ^agent_token.id),
from(t in Agents.AgentToken, where: t.id == ^agent_token.id),
set: [last_seen_at: ten_minutes_ago]
)
@ -133,7 +133,7 @@ defmodule ToweropsWeb.AgentLiveTest do
Agents.update_agent_token_heartbeat(agent_token.id, "127.0.0.1")
Towerops.Repo.update_all(
Ecto.Query.from(t in Agents.AgentToken, where: t.id == ^agent_token.id),
from(t in Agents.AgentToken, where: t.id == ^agent_token.id),
set: [last_seen_at: two_hours_ago]
)
@ -151,7 +151,7 @@ defmodule ToweropsWeb.AgentLiveTest do
Agents.update_agent_token_heartbeat(agent_token.id, "127.0.0.1")
Towerops.Repo.update_all(
Ecto.Query.from(t in Agents.AgentToken, where: t.id == ^agent_token.id),
from(t in Agents.AgentToken, where: t.id == ^agent_token.id),
set: [last_seen_at: two_days_ago]
)