Skip to content

Commit

Permalink
automated: linux: use default token with lmp-device-register
Browse files Browse the repository at this point in the history
If LmP is configured with auto-registration, there should be a default
token available on the device. With this patch lmp-device-register test
uses the default token avoiding exposing it through test job.

Signed-off-by: Milosz Wasilewski <[email protected]>
  • Loading branch information
mwasilew authored and roxell committed Feb 16, 2024
1 parent 38fdc56 commit bb0d9f1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions automated/linux/lmp-device-register/lmp-device-register.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,12 @@ fi

# quit if token is not provided
if [ -z "${TOKEN}" ]; then
# exit the test
error_fatal "Token not provided"
if [ -f /etc/lmp-device-register-token ]; then
TOKEN=$(head -n1 /etc/lmp-device-register-token)
else
# exit the test
error_fatal "Token not provided"
fi
fi

if [ -z "${REG_UUID}" ]; then
Expand Down

0 comments on commit bb0d9f1

Please sign in to comment.