From 3ce0150396e475a8a459a635391648e330e25b52 Mon Sep 17 00:00:00 2001 From: TzeYiing Date: Wed, 11 Dec 2024 17:25:59 +0800 Subject: [PATCH] chore: fix failing tests --- lib/logflare/backends/adaptor/webhook_adaptor.ex | 2 +- test/logflare/backends/loki_adaptor_test.exs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/logflare/backends/adaptor/webhook_adaptor.ex b/lib/logflare/backends/adaptor/webhook_adaptor.ex index 1aaef6693..320118ee2 100644 --- a/lib/logflare/backends/adaptor/webhook_adaptor.ex +++ b/lib/logflare/backends/adaptor/webhook_adaptor.ex @@ -105,7 +105,7 @@ defmodule Logflare.Backends.Adaptor.WebhookAdaptor do module: {BufferProducer, [ - backend_id: args.backend.id, + backend_id: Map.get(args.backend || %{}, :id), source_id: args.source.id ]}, transformer: {__MODULE__, :transform, []}, diff --git a/test/logflare/backends/loki_adaptor_test.exs b/test/logflare/backends/loki_adaptor_test.exs index b53c2091e..f26807ff6 100644 --- a/test/logflare/backends/loki_adaptor_test.exs +++ b/test/logflare/backends/loki_adaptor_test.exs @@ -52,6 +52,7 @@ defmodule Logflare.Backends.Adaptor.LokiAdaptorTest do describe "logs ingestion" do setup do + insert(:plan) user = insert(:user) source = insert(:source, user: user)