Skip to content

dts: dts-e2e.robot: add credentials test cases #949

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions dts/dts-e2e.robot
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
25 changes: 25 additions & 0 deletions lib/dts-lib.robot
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe you should also verify that credentials set in MinIO CLI (mc) changed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point


# 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
Loading