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:
Patrik Flykt 2020-03-24 15:24:33 +02:00 committed by Jukka Rissanen
commit c99392f2d6
2 changed files with 116 additions and 80 deletions

View file

@ -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=$?
;;
*)