Skip to content

Commit

Permalink
Replace user creation with cmd line option
Browse files Browse the repository at this point in the history
Signed-off-by: Samuli Leivo <[email protected]>
  • Loading branch information
leivos-unikie committed Dec 16, 2024
1 parent 693be53 commit 25ce4e3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 13 deletions.
9 changes: 0 additions & 9 deletions Robot-Framework/resources/gui_keywords.resource
Original file line number Diff line number Diff line change
Expand Up @@ -151,12 +151,3 @@ GUI Unlock
Start ydotoold
Log To Console Typing password to unlock
Type string and press enter ${PASSWORD}

Initial user creation
[Documentation] At first boot create user credentials via ydotool
Log To Console Setting user name and password
Start ydotoold
Type string and press enter ${USER_LOGIN}
Type string and press enter ${USER_LOGIN}
Type string and press enter ${USER_PASSWORD}
Type string and press enter ${USER_PASSWORD}
7 changes: 6 additions & 1 deletion Robot-Framework/resources/ssh_keywords.resource
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,11 @@ Detect first boot
Connect to netvm
${status} ${output} Run Keyword And Ignore Error Connect to VM ${GUI_VM} ${USER_LOGIN} ${USER_PASSWORD}
IF $status=='PASS'
Log To Console Test user exists
RETURN ${False}
END
RETURN ${True}
RETURN ${True}

Create test user
Log To Console Creating test user
Execute Command systemctl start setup-test-user.service sudo=True sudo_password=${password}
4 changes: 1 addition & 3 deletions Robot-Framework/test-suites/bat-tests/__init__.robot
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ Documentation BAT tests
Resource ../../resources/ssh_keywords.resource
Resource ../../resources/serial_keywords.resource
Resource ../../resources/common_keywords.resource
Resource ../../resources/gui_keywords.resource
Suite Setup Common Setup
Suite Teardown Common Teardown

Expand Down Expand Up @@ -35,11 +34,10 @@ Common Setup
${connection} Connect
Connect to netvm
Connect to VM ${GUI_VM}
Initial user creation
Create test user
END
Close All Connections
${connection} Connect
# BuiltIn.Sleep 20
END

Common Teardown
Expand Down

0 comments on commit 25ce4e3

Please sign in to comment.