Skip to content

Commit

Permalink
chore: fix tests that have renamed headers
Browse files Browse the repository at this point in the history
  • Loading branch information
Ziinc committed Jan 28, 2025
1 parent 57f6885 commit ef95b50
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/logflare_grpc/trace/server_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ defmodule LogflareGrpc.Trace.ServerTest do
user: user,
port: port
} do
headers = [{"x-api-key", user.api_key}, {"x-source-id", source.token}]
headers = [{"x-api-key", user.api_key}, {"x-source", source.token}]

{:ok, channel} =
GRPC.Stub.connect("localhost:#{port}",
Expand All @@ -52,7 +52,7 @@ defmodule LogflareGrpc.Trace.ServerTest do
end

test "returns an error if invalid api key", %{source: source, port: port} do
headers = [{"x-api-key", "potato"}, {"x-source-id", source.token}]
headers = [{"x-api-key", "potato"}, {"x-source", source.token}]

{:ok, channel} =
GRPC.Stub.connect("localhost:#{port}",
Expand All @@ -71,7 +71,7 @@ defmodule LogflareGrpc.Trace.ServerTest do
user: user,
port: port
} do
headers = [{"x-api-key", user.api_key}, {"x-source-id", "potato"}]
headers = [{"x-api-key", user.api_key}, {"x-source", "potato"}]

{:ok, channel} =
GRPC.Stub.connect("localhost:#{port}",
Expand All @@ -87,7 +87,7 @@ defmodule LogflareGrpc.Trace.ServerTest do
end

test "returns an error if missing x-api-key header", %{source: source, port: port} do
headers = [{"x-source-id", source.token}]
headers = [{"x-source", source.token}]

{:ok, channel} =
GRPC.Stub.connect("localhost:#{port}",
Expand All @@ -102,7 +102,7 @@ defmodule LogflareGrpc.Trace.ServerTest do
assert %GRPC.RPCError{message: "Invalid API Key or Source ID"} = result
end

test "returns an error if missing x-source-id header", %{
test "returns an error if missing x-source header", %{
user: user,
port: port
} do
Expand Down

0 comments on commit ef95b50

Please sign in to comment.