From c18d3338c4bdb3ef97a2ece302e50176d2a8e156 Mon Sep 17 00:00:00 2001 From: Brooks Townsend Date: Wed, 25 Oct 2023 16:41:11 -0400 Subject: [PATCH] fix: use annotations on provider start Signed-off-by: Brooks Townsend make tests accurate --- lib/lattice_observer/observed/lattice.ex | 3 +-- mix.exs | 2 +- test/support/cloud_events.ex | 4 ++-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/lattice_observer/observed/lattice.ex b/lib/lattice_observer/observed/lattice.ex index 8778f16..fb0135e 100644 --- a/lib/lattice_observer/observed/lattice.ex +++ b/lib/lattice_observer/observed/lattice.ex @@ -287,7 +287,6 @@ defmodule LatticeObserver.Observed.Lattice do } ) do annotations = Map.get(d, "annotations", %{}) - spec = Map.get(annotations, @annotation_app_spec, "") claims = Map.get(d, "claims", %{}) l = @@ -309,7 +308,7 @@ defmodule LatticeObserver.Observed.Lattice do link_name, contract_id, instance_id, - spec, + annotations, stamp, claims ) diff --git a/mix.exs b/mix.exs index 7756c7c..c7bda96 100644 --- a/mix.exs +++ b/mix.exs @@ -4,7 +4,7 @@ defmodule LatticeObserver.MixProject do def project do [ app: :lattice_observer, - version: "0.4.2", + version: "0.4.3", elixir: "~> 1.12", elixirc_paths: compiler_paths(Mix.env()), start_permanent: Mix.env() == :prod, diff --git a/test/support/cloud_events.ex b/test/support/cloud_events.ex index 49285f4..45d2058 100644 --- a/test/support/cloud_events.ex +++ b/test/support/cloud_events.ex @@ -74,13 +74,13 @@ defmodule TestSupport.CloudEvents do |> Cloudevents.from_map!() end - def provider_started(pk, contract_id, link_name, instance_id, spec, host) do + def provider_started(pk, contract_id, link_name, instance_id, annotations, host) do %{ "public_key" => pk, "instance_id" => instance_id, "link_name" => link_name, "contract_id" => contract_id, - "annotations" => %{@appspec => spec}, + "annotations" => annotations, "claims" => %{ "name" => "test provider", "version" => "1.0",