Skip to content

Commit 722d94c

Browse files
committed
lib: dts-lib: add Check DPP Credentials In DTS KW
Signed-off-by: Daniil Klimuk <[email protected]>
1 parent 4e6b0cc commit 722d94c

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

lib/dts-lib.robot

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -555,3 +555,28 @@ Execute Manual Step While Freeing Serial Connection
555555
Execute Manual Step
556556
... ${msg}. Make sure to close serial connection before continuing
557557
Serial Setup ${RTE_IP} ${RTE_S2_N_PORT}
558+
559+
Check DPP Credentials In DTS
560+
[Documentation] This KW checks whether DTS saves provided credentials
561+
.... correctly.
562+
[Arguments] ${dpp_email} ${dpp_password}
563+
${credentials}= Execute Command In Terminal cat /etc/cloud-pass
564+
565+
# The /etc/cloud-pass is being created when the credential are being saved:
566+
Should Not Contain @{credentials} No such file or directory
567+
568+
${line_count}= Get Line Count ${credentials}
569+
IF ${line_count} != 2
570+
# There should be no more than 2 lines in the /etc/cloud-pass
571+
Fail More than 2 lines in /etc/cloud-pass
572+
END
573+
574+
# The first line should be email:
575+
${current_email}= Get Line ${credentials} 0
576+
# The second line should be password:
577+
${current_password}= Get Line ${credentials} 1
578+
IF '${current_email}' != '${dpp_email}'
579+
Fail DPP email was not saved correctly
580+
ELSE IF '${current_password}' != '${dpp_password}'
581+
Fail DPP password was not saved correctly
582+
END

0 commit comments

Comments
 (0)