Skip to content

Commit

Permalink
scripts: net: Add SOCKS 5 to MQTT TLS sample test
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
pfl authored and jukkar committed Apr 28, 2020
1 parent 0be8127 commit 1907059
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 6 deletions.
27 changes: 22 additions & 5 deletions scripts/net/run-sample-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 $?

Expand All @@ -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 $?

Expand All @@ -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
;;

*)
Expand Down
2 changes: 1 addition & 1 deletion west.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ manifest:
revision: 1843fdce2b008b45f9cc8b38dd9a57a575ab50f6
path: modules/lib/mcumgr
- name: net-tools
revision: 1080094bc246357c6c35e80e8b2d5d0ce7e0d963
revision: 1c4fdba512b268033a4cf926bddd323866c3261a
path: tools/net-tools
- name: hal_nxp
revision: 60fe8c0ae6e24d165cf42770b95c7df22b778386
Expand Down

0 comments on commit 1907059

Please sign in to comment.