From c0b48d3015eb9bd76e869c023f12e273fd0916fe Mon Sep 17 00:00:00 2001 From: Simone Orru Date: Tue, 29 Oct 2024 14:36:26 +0100 Subject: [PATCH 1/3] Docs: Remove warning for development version Signed-off-by: Simone Orru --- doc/pages/tutorials/010-astarte_in_5_minutes.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/doc/pages/tutorials/010-astarte_in_5_minutes.md b/doc/pages/tutorials/010-astarte_in_5_minutes.md index f4f80f8af..d8e8bdbc0 100644 --- a/doc/pages/tutorials/010-astarte_in_5_minutes.md +++ b/doc/pages/tutorials/010-astarte_in_5_minutes.md @@ -1,7 +1,5 @@ # Astarte in 5 minutes -**This documentation page describes a development version, for production systems please use the [stable version](https://docs.astarte-platform.org/latest) instead.** - This tutorial will guide you through bringing up your Astarte instance, creating a realm and streaming your first data from a device simulator (or a real device) before your cup of tea is ready. ## Before you begin From 0643004945ed50e709d89e266110c34be8b85fb0 Mon Sep 17 00:00:00 2001 From: Eddy Babetto Date: Thu, 21 Nov 2024 17:28:35 +0100 Subject: [PATCH 2/3] Realm Management API: fix tests flakiness Fix realm_management_api tests for triggerController adding a proper realm setup Resolves :jose_jwk.from_pem/1 not found error Signed-off-by: Eddy Babetto --- .../controllers/trigger_controller_test.exs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/astarte_realm_management_api/test/astarte_realm_management_api_web/controllers/trigger_controller_test.exs b/apps/astarte_realm_management_api/test/astarte_realm_management_api_web/controllers/trigger_controller_test.exs index 31690e3dd..a379f93aa 100644 --- a/apps/astarte_realm_management_api/test/astarte_realm_management_api_web/controllers/trigger_controller_test.exs +++ b/apps/astarte_realm_management_api/test/astarte_realm_management_api_web/controllers/trigger_controller_test.exs @@ -19,12 +19,16 @@ defmodule Astarte.RealmManagement.APIWeb.TriggerControllerTest do use Astarte.RealmManagement.APIWeb.ConnCase + alias Astarte.RealmManagement.API.JWTTestHelper + alias Astarte.RealmManagement.Mock + @create_attrs %{} @invalid_attrs %{} @test_realm "test" setup %{conn: conn} do + Mock.DB.put_jwt_public_key_pem(@test_realm, JWTTestHelper.public_key_pem()) {:ok, conn: put_req_header(conn, "accept", "application/json")} end From 461cb5b54a0190169fe9244d27b63d35e81cef34 Mon Sep 17 00:00:00 2001 From: Eddy Babetto Date: Thu, 21 Nov 2024 17:47:36 +0100 Subject: [PATCH 3/3] Trigger Engine: fix tests flakiness ix trigger_engine amqp_consumer tracker tests adding a sleep before checks Resolves registry not found that sometimes used to arise, caused by an amqp delay Signed-off-by: Eddy Babetto --- .../test/amqp_consumer/amqp_consumer_tracker_test.exs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/astarte_trigger_engine/test/amqp_consumer/amqp_consumer_tracker_test.exs b/apps/astarte_trigger_engine/test/amqp_consumer/amqp_consumer_tracker_test.exs index 4dbc1a11d..3357406ff 100644 --- a/apps/astarte_trigger_engine/test/amqp_consumer/amqp_consumer_tracker_test.exs +++ b/apps/astarte_trigger_engine/test/amqp_consumer/amqp_consumer_tracker_test.exs @@ -83,6 +83,7 @@ defmodule Astarte.TriggerEngine.AMQPConsumer.AMQPConsumerTrackerTest do # make sure we update the consumer list without waiting for the update timeout AMQPConsumerTracker.handle_info(:update_consumers, []) + Process.sleep(3000) assert Enum.member?( Registry.select(Registry.AMQPConsumerRegistry, [{{:"$1", :_, :_}, [], [:"$1"]}]), @@ -93,6 +94,7 @@ defmodule Astarte.TriggerEngine.AMQPConsumer.AMQPConsumerTrackerTest do # make sure we update the consumer list without waiting for the update timeout AMQPConsumerTracker.handle_info(:update_consumers, []) + Process.sleep(3000) assert not Enum.member?( Registry.select(Registry.AMQPConsumerRegistry, [{{:"$1", :_, :_}, [], [:"$1"]}]),