Skip to content

Commit 5d1162b

Browse files
committed
lib: dts-lib: add Check DPP Credentials In DTS KW
Signed-off-by: Daniil Klimuk <[email protected]>
1 parent 64d5315 commit 5d1162b

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
@@ -412,3 +412,28 @@ Go Through Update Decline Heads
412412
Wait For Checkpoint And Write ${DTS_HEADS_SWITCH_QUESTION} N
413413
Wait For Checkpoint And Write ${DTS_SPECIFICATION_WARN} Y
414414
Wait For Checkpoint And Write ${DTS_DEPLOY_WARN} Y
415+
416+
Check DPP Credentials In DTS
417+
[Documentation] This KW checks whether DTS saves provided credentials
418+
.... correctly.
419+
[Arguments] ${dpp_email} ${dpp_password}
420+
${credentials}= Execute Command In Terminal cat /etc/cloud-pass
421+
422+
# The /etc/cloud-pass is being created when the credential are being saved:
423+
Should Not Contain @{credentials} No such file or directory
424+
425+
${line_count}= Get Line Count ${credentials}
426+
IF ${line_count} != 2
427+
# There should be no more than 2 lines in the /etc/cloud-pass
428+
Fail More than 2 lines in /etc/cloud-pass
429+
END
430+
431+
# The first line should be email:
432+
${current_email}= Get Line ${credentials} 0
433+
# The second line should be password:
434+
${current_password}= Get Line ${credentials} 1
435+
IF '${current_email}' != '${dpp_email}'
436+
Fail DPP email was not saved correctly
437+
ELSE IF '${current_password}' != '${dpp_password}'
438+
Fail DPP password was not saved correctly
439+
END

0 commit comments

Comments
 (0)