@@ -57,11 +57,261 @@ E2E001.001 HCL Report test
5757# Credentials tests:
5858################################################################################
5959
60- E2E007.001 QEMU Check credentials are being saved correctly
61- E2E007.002 QEMU Check old credentials are being overwritten by new
62- E2E007.003 QEMU Check wrong credentials should not allow to log into DPP services
63- E2E007.004 QEMU Check correct credentials should allow to log into DPP services
64- E2E007.005 QEMU Check empty credentials should not pass
60+ E2E007.001 Check credentials are being saved correctly
61+ [Documentation] Check that credentials are saved to /etc/cloud-pass and
62+ ... to mc correctly
63+ Clean Up DTS Environment
64+ Execute Command In Terminal export DTS_TESTING="true"
65+ Write Into Terminal dts-boot
66+
67+ Provide DPP Credentials
68+ Wait For Checkpoint ${DTS_CHECKPOINT }
69+ Enter Shell In DTS
70+ ${creds } = Execute Command In Terminal cat /etc/cloud-pass
71+ @{lines } = Split To Lines ${creds }
72+ ${line_num } = Get Length ${lines }
73+ Should Be Equal As Integers ${line_num } 2 cloud-pass file should have only 2 lines
74+ IF "${lines } [0 ]" != "${DPP_EMAIL } " or "${lines } [1 ]" != "${DPP_PASSWORD } "
75+ Fail E-mail or password is different from expected
76+ END
77+ ${creds2 } = Execute Command In Terminal mc alias ls premium | grep "Key" | awk '{print $3}'
78+ Should Be Equal ${creds } ${creds2 }
79+ ... /etc/cloud-pass and mc credentials differ
80+
81+ E2E007.002 Check old credentials are being overwritten by new
82+ [Documentation] Make sure that entering new credentials results in old
83+ ... being overwritten. Requires 2 sets of working credentials as mc
84+ ... doesn't save credentials that do not work.
85+ Depends On Variable \${DPP_EMAIL_FW_ONLY}
86+ Depends On Variable \${DPP_PASSWORD_FW_ONLY}
87+ Clean Up DTS Environment
88+ Execute Command In Terminal export DTS_TESTING="true"
89+ Write Into Terminal dts-boot
90+
91+ Provide DPP Credentials
92+ VAR ${DPP_EMAIL } = ${DPP_EMAIL_FW_ONLY } scope=TEST
93+ VAR ${DPP_PASSWORD } = ${DPP_PASSWORD_FW_ONLY } scope=TEST
94+ Provide DPP Credentials
95+ Wait For Checkpoint ${DTS_CHECKPOINT }
96+ Enter Shell In DTS
97+
98+ ${creds } = Execute Command In Terminal cat /etc/cloud-pass
99+ @{lines } = Split To Lines ${creds }
100+ ${line_num } = Get Length ${lines }
101+ Should Be Equal As Integers ${line_num } 2 cloud-pass file should have only 2 lines
102+ IF "${lines } [0 ]" != "${DPP_EMAIL_FW_ONLY } " or "${lines } [1 ]" != "${DPP_PASSWORD_FW_ONLY } "
103+ Fail E-mail or password is different from expected
104+ END
105+ ${creds2 } = Execute Command In Terminal mc alias ls premium | grep "Key" | awk '{print $3}'
106+ Should Be Equal ${creds } ${creds2 }
107+ ... /etc/cloud-pass and mc credentials differ
108+
109+ E2E007.003 Check wrong credentials should not allow to log into DPP services
110+ [Documentation] Entering wrong credentials shouldn't allow access to DPP
111+ ... services and shouldn't be saved
112+ Clean Up DTS Environment
113+ Execute Command In Terminal export DTS_TESTING="true"
114+ Write Into Terminal dts-boot
115+
116+ VAR
${DPP_EMAIL } =
[email protected] scope=TEST
117+ VAR ${DPP_PASSWORD } = test-password scope=TEST
118+ ${out } = Provide DPP Credentials
119+ Should Contain ${out } Cannot log in to DPP server.
120+ Should Not Contain ${out } Dasharo DPP credentials have been saved
121+ Wait For Checkpoint ${DTS_CHECKPOINT }
122+ Enter Shell In DTS
123+ ${creds } = Execute Command In Terminal cat /etc/cloud-pass
124+ Should Not Contain Any ${creds } ${DPP_EMAIL } ${DPP_PASSWORD }
125+ ${creds2 } = Execute Command In Terminal
126+ ... mc alias ls premium | grep "Key" | awk '{print $3}'
127+ Should Not Contain Any ${creds2 } ${DPP_EMAIL } ${DPP_PASSWORD }
128+
129+ E2E007.004 Check correct credentials should allow to log into DPP services
130+ [Documentation] Entering correct credentials should allow access to DPP
131+ ... services
132+ Clean Up DTS Environment
133+ # We need to simulate supported platform
134+ Export Shell Variables For Emulation
135+ ... UEFI Update
136+ ... DPP
137+ ... ${DTS_PLATFORM_VARIABLES } [odroid-h4-plus]
138+ ... ${DTS_CONFIG_REF }
139+ Write Into Terminal dts-boot
140+
141+ ${out } = Provide DPP Credentials
142+ Should Contain ${out } Dasharo Pro Package (DPP): YES
143+ Wait For Checkpoint ${DTS_CHECKPOINT }
144+ Enter Shell In DTS
145+ ${rc } = Execute Command In Terminal And Return RC mc ls premium
146+ Should Be Equal As Integers ${rc } 0
147+ ... mc command failed to list buckets
148+
149+ E2E007.005 Check empty e-mail should not pass
150+ [Documentation] Entering empty e-mail shouldn't be allowed
151+ Clean Up DTS Environment
152+ Write Into Terminal dts-boot
153+ ${out } = Read From Terminal Until ${DTS_CHECKPOINT }
154+ Write Bare Into Terminal ${DTS_CREDENTIALS_OPT }
155+ Wait For Checkpoint And Press Enter ${DPP_EMAIL_CHECKPOINT }
156+ Set DUT Response Timeout 15s
157+ Wait For Checkpoint And Press Enter ${DTS_CONFIRM_CHECKPOINT }
158+ Wait For Checkpoint ${DTS_CHECKPOINT }
159+ Enter Shell In DTS
160+ ${lines } = Execute Command In Terminal
161+ ... cat /etc/cloud-pass 2>/dev/null | wc -l
162+ Should Be Equal As Integers ${lines } 0 cloud-pass shouldn't exist or at least be empty
163+
164+ E2E007.006 Check empty password should not pass
165+ [Documentation] Entering empty password shouldn't be allowed
166+ Clean Up DTS Environment
167+ Write Into Terminal dts-boot
168+ ${out } = Read From Terminal Until ${DTS_CHECKPOINT }
169+ Write Bare Into Terminal ${DTS_CREDENTIALS_OPT }
170+ Wait For Checkpoint And Write ${DPP_EMAIL_CHECKPOINT } ${DPP_EMAIL }
171+ Wait For Checkpoint And Press Enter ${DPP_PASSWORD_CHECKPOINT }
172+ ${out } = Wait For Checkpoint And Press Enter ${DTS_CONFIRM_CHECKPOINT }
173+ Should Not Contain ${out } Dasharo Pro Package (DPP):
174+ Wait For Checkpoint ${DTS_CHECKPOINT }
175+ Enter Shell In DTS
176+ ${lines } = Execute Command In Terminal
177+ ... cat /etc/cloud-pass 2>/dev/null | wc -l
178+ Should Be Equal As Integers ${lines } 0 cloud-pass shouldn't exist or at least be empty
179+
180+ E2E007.008 Check DPP credentials with access to only firmware
181+ [Documentation] Those credentials should allow access only to DPP
182+ ... firmware
183+ Depends On Variable \${DPP_EMAIL_FW_ONLY}
184+ Depends On Variable \${DPP_PASSWORD_FW_ONLY}
185+ Clean Up DTS Environment
186+ Export Shell Variables For Emulation
187+ ... UEFI Update
188+ ... DPP
189+ ... ${DTS_PLATFORM_VARIABLES } [odroid-h4-plus]
190+ ... ${DTS_CONFIG_REF }
191+ Write Into Terminal dts-boot
192+
193+ VAR ${DPP_EMAIL } = ${DPP_EMAIL_FW_ONLY } scope=TEST
194+ VAR ${DPP_PASSWORD } = ${DPP_PASSWORD_FW_ONLY } scope=TEST
195+ ${out } = Provide DPP Credentials
196+ Should Contain ${out } Dasharo Pro Package (DPP): YES
197+ Should Contain ${out } DTS Extensions: NO
198+
199+ E2E007.009 Check DPP credentials with access to only extensions
200+ [Documentation] Those credentials should allow access only to DTS
201+ ... extensions
202+ Depends On Variable \${DPP_EMAIL_EXTENSIONS_ONLY}
203+ Depends On Variable \${DPP_PASSWORD_EXTENSIONS_ONLY}
204+ Clean Up DTS Environment
205+ Export Shell Variables For Emulation
206+ ... UEFI Update
207+ ... DPP
208+ ... ${DTS_PLATFORM_VARIABLES } [odroid-h4-plus]
209+ ... ${DTS_CONFIG_REF }
210+ Write Into Terminal dts-boot
211+
212+ VAR ${DPP_EMAIL } = ${DPP_EMAIL_EXTENSIONS_ONLY } scope=TEST
213+ VAR ${DPP_PASSWORD } = ${DPP_PASSWORD_EXTENSIONS_ONLY } scope=TEST
214+ ${out } = Provide DPP Credentials
215+ Should Contain ${out } Dasharo Pro Package (DPP): NO
216+ Should Contain ${out } DTS Extensions: YES
217+
218+ E2E007.010 Check DPP credentials without DPP access
219+ [Documentation] Those credentials shouldn't allow access to any firmware
220+ ... or DTS extensions
221+ Depends On Variable \${DPP_EMAIL_NO_ACCESS}
222+ Depends On Variable \${DPP_PASSWORD_NO_ACCESS}
223+ Clean Up DTS Environment
224+ Export Shell Variables For Emulation
225+ ... UEFI Update
226+ ... DPP
227+ ... ${DTS_PLATFORM_VARIABLES } [odroid-h4-plus]
228+ ... ${DTS_CONFIG_REF }
229+ Write Into Terminal dts-boot
230+
231+ VAR ${DPP_EMAIL } = ${DPP_EMAIL_NO_ACCESS } scope=TEST
232+ VAR ${DPP_PASSWORD } = ${DPP_PASSWORD_NO_ACCESS } scope=TEST
233+ ${out } = Provide DPP Credentials
234+ Should Contain ${out } Something may be wrong with the DPP credentials
235+ ${out } = Wait For Checkpoint And Press Enter ${DTS_CONFIRM_CHECKPOINT }
236+ Should Contain ${out } Dasharo Pro Package (DPP): NO
237+ Should Contain ${out } DTS Extensions: NO
238+
239+ E2E007.011 Check DPP credentials with both DPP firmware and DTS extensions access
240+ [Documentation] Those credentials should allow access to both DPP
241+ ... firmware and DTS extensions
242+ Clean Up DTS Environment
243+ Export Shell Variables For Emulation
244+ ... UEFI Update
245+ ... DPP
246+ ... ${DTS_PLATFORM_VARIABLES } [odroid-h4-plus]
247+ ... ${DTS_CONFIG_REF }
248+ Write Into Terminal dts-boot
249+
250+ ${out } = Provide DPP Credentials
251+ Should Contain ${out } Dasharo Pro Package (DPP): YES
252+ Should Contain ${out } DTS Extensions: YES
253+
254+ E2E008.001 Reboot UI Option Calls Reboot Command
255+ [Documentation] Reboot (R) UI option should call mocked reboot command
256+ Clean Up DTS Environment
257+ Execute Command In Terminal export DTS_TESTING="true"
258+ Write Into Terminal dts-boot
259+ Wait For Checkpoint ${DTS_CHECKPOINT }
260+ Write Bare Into Terminal R
261+ Wait For Checkpoint common_mock: using reboot
262+
263+ E2E008.002 Poweroff UI Option Calls Poweroff Command
264+ [Documentation] Poweroff (P) UI option should call mocked poweroff
265+ Clean Up DTS Environment
266+ Execute Command In Terminal export DTS_TESTING="true"
267+ Write Into Terminal dts-boot
268+ Wait For Checkpoint ${DTS_CHECKPOINT }
269+ Write Bare Into Terminal P
270+ Wait For Checkpoint common_mock: using poweroff
271+
272+ E2E008.003 Launch SSH Server UI Option Enables SSH Server Command
273+ [Documentation] Launch SSH Server (K) UI option should start sshd server
274+ Clean Up DTS Environment
275+ Execute Command In Terminal export DTS_TESTING="true"
276+ Execute Command In Terminal systemctl stop sshd
277+ Write Into Terminal dts-boot
278+ ${out } = Wait For Checkpoint ${DTS_CHECKPOINT }
279+ Should Not Contain ${out } SSH status: ON
280+ Write Bare Into Terminal K
281+ ${out } = Wait For Checkpoint And Press Enter ${DTS_CONFIRM_CHECKPOINT }
282+ Should Contain All ${out } Starting SSH server! Listening on IPs
283+ ${out } = Wait For Checkpoint ${DTS_CHECKPOINT }
284+ Should Contain ${out } SSH status: ON
285+
286+ E2E008.004 Enable Sending Logs UI Option Should Enable DTS Log Sending
287+ [Documentation] Enable Sending DTS Logs (L) should enable automatic log
288+ ... sending e.g. when entering shell
289+ Clean Up DTS Environment
290+ Execute Command In Terminal export DTS_TESTING="true"
291+ Write Into Terminal dts-boot
292+ ${out } = Wait For Checkpoint ${DTS_CHECKPOINT }
293+ Should Contain ${out } L to enable
294+ Write Bare Into Terminal L
295+ ${out } = Wait For Checkpoint ${DTS_CHECKPOINT }
296+ Should Contain ${out } L to disable
297+ Write Bare Into Terminal S
298+ SSHLibrary.Read Until Sending logs...
299+
300+ E2E009.001 DTS extensions are installed and can be used
301+ [Documentation] Test that DTS extensions are installed after entering DPP
302+ ... keys with access to them and that they can be used after.
303+ Clean Up DTS Environment
304+ Execute Command In Terminal export DTS_TESTING="true"
305+ Write Into Terminal dts-boot
306+
307+ ${out } = Provide DPP Credentials
308+ Should Contain ${out }
309+ ... Package txeconfigtool-git-r0.core2_64.rpm have been installed successfully!
310+ Wait For Checkpoint ${DTS_CHECKPOINT }
311+ Enter Shell In DTS
312+ ${rc } = Execute Command In Terminal And Return RC command -V txeconfigtool
313+ Should Be Equal As Integers ${rc } 0 txeconfigtool can't be found
314+
65315
66316*** Keywords ***
67317# robocop: disable:0919
0 commit comments