File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
tests/net/lib/mqtt/v3_1_1/mqtt_client/src Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -710,6 +710,23 @@ ZTEST(mqtt_client, test_mqtt_connect)
710
710
zassert_false (test_ctx .connected , "MQTT client should be disconnected" );
711
711
}
712
712
713
+ ZTEST (mqtt_client , test_mqtt_connect_with_binding )
714
+ {
715
+ char name_buf [IFNAMSIZ ] = { 0 };
716
+ int ret = net_if_get_name (net_if_get_first_by_type (& NET_L2_GET_NAME (DUMMY )),
717
+ name_buf , sizeof (name_buf ));
718
+
719
+
720
+ zassert_true (ret > 0 , "Failed to get loopback interface name" );
721
+
722
+ client_ctx .transport .if_name = name_buf ;
723
+
724
+ test_connect ();
725
+ zassert_true (test_ctx .connected , "MQTT client should be connected" );
726
+ test_disconnect ();
727
+ zassert_false (test_ctx .connected , "MQTT client should be disconnected" );
728
+ }
729
+
713
730
ZTEST (mqtt_client , test_mqtt_ping )
714
731
{
715
732
test_connect ();
You can’t perform that action at this time.
0 commit comments