diff --git a/lib/client.ex b/lib/client.ex index 12425ba..e30a010 100644 --- a/lib/client.ex +++ b/lib/client.ex @@ -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( [ @@ -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 diff --git a/lib/worker.ex b/lib/worker.ex index d59805b..4b3da4d 100644 --- a/lib/worker.ex +++ b/lib/worker.ex @@ -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(),