Skip to content

Commit 172caab

Browse files
committed
Allow tedge connect c8y --test to work with internal bridge
Signed-off-by: James Rhodes <jarhodes314@gmail.com>
1 parent 30e2434 commit 172caab

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

crates/core/tedge/src/cli/connect/command.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,11 @@ impl Command for ConnectCommand {
6565
let updated_mosquitto_config = CommonMosquittoConfig::from_tedge_config(config);
6666

6767
if self.is_test_connection {
68-
if self.check_if_bridge_exists(&bridge_config) {
68+
// If the bridge is part of the mapper, the bridge config file won't exist
69+
// TODO tidy me up once mosquitto is no longer required for bridge
70+
if bridge_config.bridge_location == BridgeLocation::BuiltIn
71+
|| self.check_if_bridge_exists(&bridge_config)
72+
{
6973
return match self.check_connection(config) {
7074
Ok(DeviceStatus::AlreadyExists) => {
7175
let cloud = bridge_config.cloud_name;

0 commit comments

Comments
 (0)