Skip to content

Commit f5d8ab2

Browse files
authored
Merge pull request #113 from appsignal/phoenix-1.8
Add Phoenix 1.8 RC to the CI
2 parents c462b1d + 61d2bd6 commit f5d8ab2

5 files changed

Lines changed: 47 additions & 12 deletions

File tree

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,9 @@ jobs:
119119
- elixir: latest
120120
otp: 27.x
121121
phoenix: "~> 1.7.0"
122+
- elixir: 1.17.x
123+
otp: 27.x
124+
phoenix: "~> 1.8.0-rc"
122125
- elixir: 1.16.x
123126
otp: 26.x
124127
phoenix: "~> 1.7.0"

config/config.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import Config
22

33
if Mix.env() == :test do
4-
config :logger, level: :warn
4+
config :logger, level: :warning
55

66
config :appsignal, appsignal_tracer: Appsignal.Test.Tracer
77
config :appsignal, appsignal_span: Appsignal.Test.Span

test/appsignal_phoenix/event_handler_test.exs

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,12 @@ defmodule Appsignal.Phoenix.EventHandlerTest do
313313
%{time: -576_460_736_044_040_000},
314314
%{
315315
conn: %Plug.Conn{private: %{phoenix_endpoint: PhoenixWeb.Endpoint}},
316-
options: []
316+
plug: AppsignalPhoenixExampleWeb.PageController,
317+
plug_opts: :index,
318+
route: "/",
319+
path_params: %{},
320+
pipe_through: [:browser],
321+
log: :info
317322
}
318323
)
319324
end
@@ -322,7 +327,15 @@ defmodule Appsignal.Phoenix.EventHandlerTest do
322327
:telemetry.execute(
323328
[:phoenix, :router_dispatch, :stop],
324329
%{duration: 49_474_000},
325-
%{conn: conn(), route: "/foo/:bar", options: []}
330+
%{
331+
conn: conn(),
332+
plug: AppsignalPhoenixExampleWeb.PageController,
333+
plug_opts: :index,
334+
route: "/foo/:bar",
335+
path_params: %{},
336+
pipe_through: [:browser],
337+
log: :info
338+
}
326339
)
327340
end
328341

test/appsignal_phoenix/live_view_test.exs

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ defmodule Appsignal.Phoenix.LiveViewTest do
22
use ExUnit.Case
33
alias Appsignal.{Span, Test}
44

5+
def __live__, do: %{log: :info}
6+
57
setup do
68
start_supervised!(Test.Tracer)
79
start_supervised!(Test.Span)
@@ -319,7 +321,8 @@ defmodule Appsignal.Phoenix.LiveViewTest do
319321
%{
320322
params: %{foo: "bar"},
321323
session: %{bar: "baz"},
322-
socket: %Phoenix.LiveView.Socket{view: __MODULE__}
324+
socket: %Phoenix.LiveView.Socket{view: __MODULE__},
325+
uri: "http://localhost/"
323326
}
324327
)
325328
end
@@ -431,7 +434,9 @@ defmodule Appsignal.Phoenix.LiveViewTest do
431434
%{monotonic_time: -576_457_566_461_433_920, system_time: 1_653_474_764_790_125_080},
432435
%{
433436
params: %{foo: "bar"},
434-
socket: %Phoenix.LiveView.Socket{view: __MODULE__}
437+
socket: %Phoenix.LiveView.Socket{view: __MODULE__},
438+
component: __MODULE__,
439+
event: "handle_event"
435440
}
436441
)
437442
end
@@ -479,7 +484,9 @@ defmodule Appsignal.Phoenix.LiveViewTest do
479484
%{monotonic_time: -576_457_566_461_433_920, system_time: 1_653_474_764_790_125_080},
480485
%{
481486
params: %{foo: "bar"},
482-
socket: %Phoenix.LiveView.Socket{view: __MODULE__}
487+
socket: %Phoenix.LiveView.Socket{view: __MODULE__},
488+
component: __MODULE__,
489+
assigns_sockets: [{{}, %Phoenix.LiveView.Socket{view: __MODULE__}}]
483490
}
484491
)
485492
end
@@ -526,8 +533,13 @@ defmodule Appsignal.Phoenix.LiveViewTest do
526533

527534
:telemetry.execute(
528535
[:phoenix, :live_view, :mount, :stop],
529-
%{},
530-
%{}
536+
%{duration: 100_000},
537+
%{
538+
socket: %Phoenix.LiveView.Socket{view: __MODULE__},
539+
params: %{foo: "bar"},
540+
session: %{bar: "baz"},
541+
uri: "http://localhost/"
542+
}
531543
)
532544
end
533545

@@ -553,8 +565,16 @@ defmodule Appsignal.Phoenix.LiveViewTest do
553565

554566
:telemetry.execute(
555567
[:phoenix, :live_view, :mount, :exception],
556-
%{},
557-
%{kind: :error, reason: reason, stacktrace: []}
568+
%{duration: 100_000},
569+
%{
570+
socket: %Phoenix.LiveView.Socket{view: __MODULE__},
571+
params: %{foo: "bar"},
572+
session: %{bar: "baz"},
573+
uri: "http://localhost/",
574+
kind: :error,
575+
reason: reason,
576+
stacktrace: []
577+
}
558578
)
559579

560580
[reason: reason]

test/support/phoenix_web.ex

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,12 @@ end
77

88
defmodule PhoenixWeb.Endpoint do
99
use Phoenix.Endpoint, otp_app: :phoenix_web
10-
use Appsignal.Phoenix
1110

1211
plug(PhoenixWeb.Router)
1312
end
1413

1514
defmodule PhoenixWeb.Controller do
16-
use Phoenix.Controller, namespace: PhoenixWeb
15+
use Phoenix.Controller, formats: [:html]
1716
import Plug.Conn
1817

1918
def index(conn, _params) do

0 commit comments

Comments
 (0)