Skip to content

Commit

Permalink
Merge pull request #7 from NFIBrokerage/compile-env
Browse files Browse the repository at this point in the history
Use Application.compile_env and small cleanup
  • Loading branch information
electricshaman authored Oct 19, 2023
2 parents 93e4000 + c91cb8b commit e0a085e
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 6 deletions.
2 changes: 0 additions & 2 deletions config/test.exs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import Config

config :phoenix, json_library: Jason

config :slipstream_honeycomb,
honeycomb_sender: HoneycombSenderMock
2 changes: 1 addition & 1 deletion lib/slipstream/honeycomb/connection.ex
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ defmodule Slipstream.Honeycomb.Connection do
emits them to Honeycomb
"""

@sender Application.get_env(
@sender Application.compile_env(
:slipstream_honeycomb,
:honeycomb_sender,
Opencensus.Honeycomb.Sender
Expand Down
2 changes: 1 addition & 1 deletion test/slipstream/honeycomb/connection_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ defmodule Slipstream.Honeycomb.ConnectionTest do

import Mox
setup :verify_on_exit!
@sender Application.fetch_env!(:slipstream_honeycomb, :honeycomb_sender)
@sender Application.compile_env!(:slipstream_honeycomb, :honeycomb_sender)

test "honeycomb events are emitted on telemetry events" do
pid = start_supervised!(Slipstream.Honeycomb.Connection)
Expand Down
2 changes: 0 additions & 2 deletions test/test_helper.exs
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
ExUnit.start()

# Generated by Elixir.Gaas.Generators.Simple.TestHelper

0 comments on commit e0a085e

Please sign in to comment.