From 80daccea432b782b777a888a69f08c048f380e7f Mon Sep 17 00:00:00 2001 From: Reuben Miller Date: Wed, 8 May 2024 14:25:43 +0200 Subject: [PATCH 1/2] add test to verify issue #2863 Signed-off-by: Reuben Miller --- .../RobotFramework/tests/tedge_connect/tedge_connect_test.robot | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/RobotFramework/tests/tedge_connect/tedge_connect_test.robot b/tests/RobotFramework/tests/tedge_connect/tedge_connect_test.robot index bc947e24495..33d01f1d8af 100644 --- a/tests/RobotFramework/tests/tedge_connect/tedge_connect_test.robot +++ b/tests/RobotFramework/tests/tedge_connect/tedge_connect_test.robot @@ -33,6 +33,7 @@ tedge_connect_test_sm_services Should Contain ${output} Successfully created bridge connection! Should Contain ${output} tedge-agent service successfully started and enabled! Should Contain ${output} tedge-mapper-c8y service successfully started and enabled! + Should Not Contain ${output} Warning: message=Warning should not be displayed if the port does not match. Issue #2863 tedge_disconnect_test_sm_services ${output}= Execute Command sudo tedge disconnect c8y From 77a9f560642d25b24b412274f449ccf34dfb69c4 Mon Sep 17 00:00:00 2001 From: Reuben Miller Date: Wed, 8 May 2024 14:26:51 +0200 Subject: [PATCH 2/2] fix(cli): ignore port when comparing configure url with expected url Resolves #2863 Signed-off-by: Reuben Miller --- crates/core/tedge/src/cli/connect/command.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/crates/core/tedge/src/cli/connect/command.rs b/crates/core/tedge/src/cli/connect/command.rs index aec10c8487b..0ebecc0429b 100644 --- a/crates/core/tedge/src/cli/connect/command.rs +++ b/crates/core/tedge/src/cli/connect/command.rs @@ -139,8 +139,7 @@ impl Command for ConnectCommand { .c8y .mqtt .or_none() - .cloned() - .map(|u| u.to_string()) + .map(|u| u.host().to_string()) .unwrap_or_default(), ); }