Skip to content

Commit

Permalink
Fixing warnings in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
akoutmos committed Aug 9, 2024
1 parent ac8ca80 commit 283242c
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

- Dropped support for old versions of Grafana Agent and now the only available version is the 0.42.0 release of Grafana
Agent. Eventually PromEx will migrate to Grafana Alloy as that is the
[successor for Grafana agent](https://grafana.com/blog/2024/04/09/grafana-alloy-opentelemetry-collector-with-prometheus-pipelines/).
- Updated package requirements as providing support for older versions of libraries is becoming difficult.
- Removed deprecated `Logger.warn` calls [#207](https://github.com/akoutmos/prom_ex/pull/207).
- The Phoenix plugin now leans on the `[:phoenix, :endpoint, :init]` telemetry event for `Endpoint` metrics as
Expand Down
30 changes: 30 additions & 0 deletions test/support/events/phoenix_live_view.exs
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@
event: [:phoenix, :live_view, :mount, :stop],
measurements: %{duration: 518_187_700},
metadata: %{
uri: "http://localhost:4000",
params: %{},
session: %{"_csrf_token" => "KoliQihOn9FRWt9iwZlspNNg"},
socket: %{
Expand Down Expand Up @@ -274,6 +275,7 @@
root_pid: nil,
root_view: WebAppWeb.PageLive,
router: WebAppWeb.Router,
transport_pid: nil,
view: WebAppWeb.PageLive
}
}
Expand All @@ -282,6 +284,7 @@
event: [:phoenix, :live_view, :mount, :stop],
measurements: %{duration: 9_852_700},
metadata: %{
uri: "http://localhost:4000",
params: %{},
session: %{
"_csrf_token" => "KoliQihOn9FRWt9iwZlspNNg",
Expand Down Expand Up @@ -342,6 +345,7 @@
root_pid: nil,
root_view: Phoenix.LiveDashboard.PageLive,
router: WebAppWeb.Router,
transport_pid: nil,
view: Phoenix.LiveDashboard.PageLive
}
}
Expand All @@ -350,6 +354,7 @@
event: [:phoenix, :live_view, :mount, :stop],
measurements: %{duration: 1_570_300},
metadata: %{
uri: "http://localhost:4000",
params: %{"node" => "nonode@nohost", "page" => "home"},
session: %{
"_csrf_token" => "KoliQihOn9FRWt9iwZlspNNg",
Expand Down Expand Up @@ -479,6 +484,7 @@
root_pid: nil,
root_view: Phoenix.LiveDashboard.PageLive,
router: WebAppWeb.Router,
transport_pid: nil,
view: Phoenix.LiveDashboard.PageLive
}
}
Expand All @@ -487,6 +493,7 @@
event: [:phoenix, :live_view, :mount, :stop],
measurements: %{duration: 3_097_000},
metadata: %{
uri: "http://localhost:4000",
params: %{"node" => "nonode@nohost", "page" => "home"},
session: %{
"_csrf_token" => "KoliQihOn9FRWt9iwZlspNNg",
Expand Down Expand Up @@ -620,6 +627,7 @@
root_pid: nil,
root_view: Phoenix.LiveDashboard.PageLive,
router: WebAppWeb.Router,
transport_pid: nil,
view: Phoenix.LiveDashboard.PageLive
}
}
Expand All @@ -628,6 +636,7 @@
event: [:phoenix, :live_view, :mount, :stop],
measurements: %{duration: 13_033_300},
metadata: %{
uri: "http://localhost:4000",
params: %{"node" => "nonode@nohost", "page" => "metrics"},
session: %{
"_csrf_token" => "KoliQihOn9FRWt9iwZlspNNg",
Expand Down Expand Up @@ -727,6 +736,7 @@
root_pid: nil,
root_view: Phoenix.LiveDashboard.PageLive,
router: WebAppWeb.Router,
transport_pid: nil,
view: Phoenix.LiveDashboard.PageLive
}
}
Expand All @@ -735,6 +745,7 @@
event: [:phoenix, :live_view, :mount, :stop],
measurements: %{duration: 2_126_300},
metadata: %{
uri: "http://localhost:4000",
params: %{
"nav" => "phoenix",
"node" => "nonode@nohost",
Expand Down Expand Up @@ -839,6 +850,7 @@
root_pid: nil,
root_view: Phoenix.LiveDashboard.PageLive,
router: WebAppWeb.Router,
transport_pid: nil,
view: Phoenix.LiveDashboard.PageLive
}
}
Expand All @@ -847,6 +859,7 @@
event: [:phoenix, :live_view, :mount, :stop],
measurements: %{duration: 14_130_600},
metadata: %{
uri: "http://localhost:4000",
params: %{
"nav" => "phoenix",
"node" => "nonode@nohost",
Expand Down Expand Up @@ -980,6 +993,7 @@
root_pid: nil,
root_view: Phoenix.LiveDashboard.PageLive,
router: WebAppWeb.Router,
transport_pid: nil,
view: Phoenix.LiveDashboard.PageLive
}
}
Expand All @@ -988,6 +1002,7 @@
event: [:phoenix, :live_view, :mount, :stop],
measurements: %{duration: 4_767_700},
metadata: %{
uri: "http://localhost:4000",
params: %{"node" => "nonode@nohost", "page" => "request_logger"},
session: %{
"_csrf_token" => "KoliQihOn9FRWt9iwZlspNNg",
Expand Down Expand Up @@ -1091,6 +1106,7 @@
root_pid: nil,
root_view: Phoenix.LiveDashboard.PageLive,
router: WebAppWeb.Router,
transport_pid: nil,
view: Phoenix.LiveDashboard.PageLive
}
}
Expand All @@ -1099,6 +1115,7 @@
event: [:phoenix, :live_view, :mount, :stop],
measurements: %{duration: 273_200},
metadata: %{
uri: "http://localhost:4000",
params: %{
"node" => "nonode@nohost",
"page" => "request_logger",
Expand Down Expand Up @@ -1220,6 +1237,7 @@
root_pid: nil,
root_view: Phoenix.LiveDashboard.PageLive,
router: WebAppWeb.Router,
transport_pid: nil,
view: Phoenix.LiveDashboard.PageLive
}
}
Expand All @@ -1228,6 +1246,7 @@
event: [:phoenix, :live_view, :mount, :stop],
measurements: %{duration: 438_100},
metadata: %{
uri: "http://localhost:4000",
params: %{
"node" => "nonode@nohost",
"page" => "request_logger",
Expand Down Expand Up @@ -1353,6 +1372,7 @@
root_pid: nil,
root_view: Phoenix.LiveDashboard.PageLive,
router: WebAppWeb.Router,
transport_pid: nil,
view: Phoenix.LiveDashboard.PageLive
}
}
Expand All @@ -1361,6 +1381,7 @@
event: [:phoenix, :live_view, :mount, :stop],
measurements: %{duration: 445_000},
metadata: %{
uri: "http://localhost:4000",
params: %{"node" => "nonode@nohost", "page" => "applications"},
session: %{
"_csrf_token" => "KoliQihOn9FRWt9iwZlspNNg",
Expand Down Expand Up @@ -1459,6 +1480,7 @@
root_pid: nil,
root_view: Phoenix.LiveDashboard.PageLive,
router: WebAppWeb.Router,
transport_pid: nil,
view: Phoenix.LiveDashboard.PageLive
}
}
Expand All @@ -1467,6 +1489,7 @@
event: [:phoenix, :live_view, :mount, :stop],
measurements: %{duration: 226_400},
metadata: %{
uri: "http://localhost:4000",
params: %{"node" => "nonode@nohost", "page" => "processes"},
session: %{
"_csrf_token" => "KoliQihOn9FRWt9iwZlspNNg",
Expand Down Expand Up @@ -1565,6 +1588,7 @@
root_pid: nil,
root_view: Phoenix.LiveDashboard.PageLive,
router: WebAppWeb.Router,
transport_pid: nil,
view: Phoenix.LiveDashboard.PageLive
}
}
Expand All @@ -1573,6 +1597,7 @@
event: [:phoenix, :live_view, :mount, :stop],
measurements: %{duration: 899_800},
metadata: %{
uri: "http://localhost:4000",
params: %{"node" => "nonode@nohost", "page" => "ports"},
session: %{
"_csrf_token" => "KoliQihOn9FRWt9iwZlspNNg",
Expand Down Expand Up @@ -1671,6 +1696,7 @@
root_pid: nil,
root_view: Phoenix.LiveDashboard.PageLive,
router: WebAppWeb.Router,
transport_pid: nil,
view: Phoenix.LiveDashboard.PageLive
}
}
Expand All @@ -1679,6 +1705,7 @@
event: [:phoenix, :live_view, :mount, :stop],
measurements: %{duration: 224_400},
metadata: %{
uri: "http://localhost:4000",
params: %{"node" => "nonode@nohost", "page" => "sockets"},
session: %{
"_csrf_token" => "KoliQihOn9FRWt9iwZlspNNg",
Expand Down Expand Up @@ -1777,6 +1804,7 @@
root_pid: nil,
root_view: Phoenix.LiveDashboard.PageLive,
router: WebAppWeb.Router,
transport_pid: nil,
view: Phoenix.LiveDashboard.PageLive
}
}
Expand All @@ -1785,6 +1813,7 @@
event: [:phoenix, :live_view, :mount, :stop],
measurements: %{duration: 228_400},
metadata: %{
uri: "http://localhost:4000",
params: %{"node" => "nonode@nohost", "page" => "ets"},
session: %{
"_csrf_token" => "KoliQihOn9FRWt9iwZlspNNg",
Expand Down Expand Up @@ -1883,6 +1912,7 @@
root_pid: nil,
root_view: Phoenix.LiveDashboard.PageLive,
router: WebAppWeb.Router,
transport_pid: nil,
view: Phoenix.LiveDashboard.PageLive
}
}
Expand Down
11 changes: 11 additions & 0 deletions test/support/mocked_liveview_modules.ex
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
defmodule WebAppWeb.PageLive do
def __live__ do
%{log: :info}
end
end

defmodule Phoenix.LiveDashboard.PageLive do
def __live__ do
%{log: :info}
end
end

0 comments on commit 283242c

Please sign in to comment.