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(), ); } 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