Skip to content

Commit bb0d9f1

Browse files
mwasilewroxell
authored andcommitted
automated: linux: use default token with lmp-device-register
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 <milosz.wasilewski@foundries.io>
1 parent 38fdc56 commit bb0d9f1

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

automated/linux/lmp-device-register/lmp-device-register.sh

+6-2
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,12 @@ fi
3939

4040
# quit if token is not provided
4141
if [ -z "${TOKEN}" ]; then
42-
# exit the test
43-
error_fatal "Token not provided"
42+
if [ -f /etc/lmp-device-register-token ]; then
43+
TOKEN=$(head -n1 /etc/lmp-device-register-token)
44+
else
45+
# exit the test
46+
error_fatal "Token not provided"
47+
fi
4448
fi
4549

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

0 commit comments

Comments
 (0)