Skip to content

Commit

Permalink
chore: formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Ziinc committed Jan 25, 2024
1 parent 6deede4 commit b100817
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
15 changes: 8 additions & 7 deletions lib/client.ex
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,16 @@ defmodule Loadfest.Client do
endpoint = Application.get_env(:loadfest, :endpoint)
api_key = Application.get_env(:loadfest, :api_key)

middlewares = case Enum.random(["gzip", nil]) do
nil ->
[]
"gzip" ->
middlewares =
case Enum.random(["gzip", nil]) do
nil ->
[]

"gzip" ->
[
{Tesla.Middleware.Compression, format: "gzip"},
{Tesla.Middleware.Compression, format: "gzip"}
]
end
end

Tesla.client(
[
Expand All @@ -30,7 +32,6 @@ defmodule Loadfest.Client do
] ++ middlewares,
{Tesla.Adapter.Finch, name: Loadfest.Finch}
)

|> post!("/logs", Jason.encode!(payload), query: [source_name: source_name])
end
end
6 changes: 5 additions & 1 deletion lib/worker.ex
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,11 @@ defmodule Loadfest.Worker do
property_e: gen_string(),
property_f: gen_string(),
property_g: gen_string(),
generated: StreamData.map_of(StreamData.integer(1..100), gen_string(), min_length: 5, max_length: 10),
generated:
StreamData.map_of(StreamData.integer(1..100), gen_string(),
min_length: 5,
max_length: 10
),
nested:
StreamData.fixed_map(%{
property_a: gen_string(),
Expand Down

0 comments on commit b100817

Please sign in to comment.