scripts: net: Add TLS test for mqtt_publisher
In addition to the existing plain TCP MQTT test, add the same test with TLS applied. Robert Lubos provided the updated test_cert.h, which contains the same certificate as in the echo samples. Signed-off-by: Patrik Flykt <patrik.flykt@intel.com>
This commit is contained in:
parent
5b3d329a58
commit
c99392f2d6
2 changed files with 116 additions and 80 deletions
|
@ -318,7 +318,8 @@ docker_exec ()
|
|||
mqtt_publisher)
|
||||
start_configuration || return $?
|
||||
start_docker "/usr/local/sbin/mosquitto -v -p 1883
|
||||
-c /usr/local/etc/mosquitto.conf" || return $?
|
||||
-c /usr/local/etc/mosquitto/mosquitto.conf" || \
|
||||
return $?
|
||||
|
||||
start_zephyr -DOVERLAY_CONFIG=overlay-sample.conf "$overlay"
|
||||
|
||||
|
@ -326,6 +327,24 @@ docker_exec ()
|
|||
result=$?
|
||||
|
||||
stop_docker
|
||||
|
||||
if [ $result -ne 0 ]
|
||||
then
|
||||
break
|
||||
fi
|
||||
|
||||
# test TLS
|
||||
start_configuration || return $?
|
||||
start_docker "/usr/local/sbin/mosquitto -v -p 8883
|
||||
-c /usr/local/etc/mosquitto/mosquitto-tls.conf" || \
|
||||
return $?
|
||||
|
||||
start_zephyr \
|
||||
-DOVERLAY_CONFIG="overlay-tls.conf overlay-sample.conf" \
|
||||
"$overlay"
|
||||
|
||||
wait_zephyr
|
||||
result=$?
|
||||
;;
|
||||
|
||||
*)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue