From 64d53159bfa9b3473fec0e470746f3b3216fed1b Mon Sep 17 00:00:00 2001 From: Daniil Klimuk Date: Tue, 22 Jul 2025 12:00:06 +0200 Subject: [PATCH 1/2] dts: dts-e2e.robot: add credentials test cases Signed-off-by: Daniil Klimuk --- dts/dts-e2e.robot | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/dts/dts-e2e.robot b/dts/dts-e2e.robot index a0e3846670..e96637efa3 100644 --- a/dts/dts-e2e.robot +++ b/dts/dts-e2e.robot @@ -969,6 +969,15 @@ E2E006.004 Odroid H4 DPP update (Coreboot + UEFI -> Coreboot + UEFI) - with cred # 4) Start update: Go Through Update +################################################################################ +# Credentials tests: +################################################################################ + +E2E007.001 QEMU Check credentials are being saved correctly +E2E007.002 QEMU Check old credentials are being overwritten by new +E2E007.003 QEMU Check wrong credentials should not allow to log into DPP services +E2E007.004 QEMU Check correct credentials should allow to log into DPP services +E2E007.005 QEMU Check empty credentials should not pass *** Keywords *** Prepare DTS Test From 5d1162b30c41339957bd032cb6f9ead73a2e621a Mon Sep 17 00:00:00 2001 From: Daniil Klimuk Date: Fri, 25 Jul 2025 17:37:23 +0200 Subject: [PATCH 2/2] lib: dts-lib: add Check DPP Credentials In DTS KW Signed-off-by: Daniil Klimuk --- lib/dts-lib.robot | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/lib/dts-lib.robot b/lib/dts-lib.robot index 24e38ad866..0259893ecc 100644 --- a/lib/dts-lib.robot +++ b/lib/dts-lib.robot @@ -412,3 +412,28 @@ Go Through Update Decline Heads Wait For Checkpoint And Write ${DTS_HEADS_SWITCH_QUESTION} N Wait For Checkpoint And Write ${DTS_SPECIFICATION_WARN} Y Wait For Checkpoint And Write ${DTS_DEPLOY_WARN} Y + +Check DPP Credentials In DTS + [Documentation] This KW checks whether DTS saves provided credentials + .... correctly. + [Arguments] ${dpp_email} ${dpp_password} + ${credentials}= Execute Command In Terminal cat /etc/cloud-pass + + # The /etc/cloud-pass is being created when the credential are being saved: + Should Not Contain @{credentials} No such file or directory + + ${line_count}= Get Line Count ${credentials} + IF ${line_count} != 2 + # There should be no more than 2 lines in the /etc/cloud-pass + Fail More than 2 lines in /etc/cloud-pass + END + + # The first line should be email: + ${current_email}= Get Line ${credentials} 0 + # The second line should be password: + ${current_password}= Get Line ${credentials} 1 + IF '${current_email}' != '${dpp_email}' + Fail DPP email was not saved correctly + ELSE IF '${current_password}' != '${dpp_password}' + Fail DPP password was not saved correctly + END