scripts: net: Add SOCKS 5 to MQTT TLS sample test

Start SOCKS5 proxy in the net-tools Docker image and run MQTT TLS
tests with SOCKS enabled. Since the MQTT TLS server is already
running as of the previous test, start only the danted daemon.

Rely on mosquitto MQTT port being handled by the Docker image
configuration file instead of specifying it on the command line.

Signed-off-by: Patrik Flykt <patrik.flykt@intel.com>
This commit is contained in:
Patrik Flykt 2020-04-27 17:20:26 +03:00 committed by Jukka Rissanen
commit 190705960d
2 changed files with 23 additions and 6 deletions

View file

@ -317,7 +317,7 @@ docker_exec ()
mqtt_publisher)
start_configuration || return $?
start_docker "/usr/local/sbin/mosquitto -v -p 1883
start_docker "/usr/local/sbin/mosquitto -v
-c /usr/local/etc/mosquitto/mosquitto.conf" || \
return $?
@ -326,16 +326,13 @@ docker_exec ()
wait_zephyr
result=$?
stop_docker
if [ $result -ne 0 ]
then
break
fi
# test TLS
start_configuration || return $?
start_docker "/usr/local/sbin/mosquitto -v -p 8883
start_docker "/usr/local/sbin/mosquitto -v
-c /usr/local/etc/mosquitto/mosquitto-tls.conf" || \
return $?
@ -345,6 +342,26 @@ docker_exec ()
wait_zephyr
result=$?
if [ $result -ne 0 ]
then
break
fi
# TLS and SOCKS5, mosquitto TLS is already running
start_docker "/usr/sbin/danted" || \
return $?
start_zephyr \
-DOVERLAY_CONFIG="overlay-tls.conf overlay-sample.conf overlay-socks5.conf" \
"$overlay" || return $?
wait_zephyr
result=$?
stop_docker
return $result
;;
*)