@@ -57,11 +57,275 @@ E2E001.001 HCL Report test
57
57
# Credentials tests:
58
58
################################################################################
59
59
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
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
+
80
+ E2E007.002 Check old credentials are being overwritten by new
81
+ [Documentation] Make sure that entering new credentials results in old
82
+ ... being overwritten. Requires 2 sets of working credentials as mc
83
+ ... doesn't save credentials that do not work.
84
+ Depends On Variable \${DPP_EMAIL_FW_ONLY}
85
+ Depends On Variable \${DPP_PASSWORD_FW_ONLY}
86
+ Clean Up DTS Environment
87
+ Execute Command In Terminal export DTS_TESTING="true"
88
+ Write Into Terminal dts-boot
89
+
90
+ Provide DPP Credentials
91
+ VAR ${DPP_EMAIL } = ${DPP_EMAIL_FW_ONLY } scope=TEST
92
+ VAR ${DPP_PASSWORD } = ${DPP_PASSWORD_FW_ONLY } scope=TEST
93
+ Provide DPP Credentials
94
+ Wait For Checkpoint ${DTS_CHECKPOINT }
95
+ Enter Shell In DTS
96
+
97
+ ${creds } = Execute Command In Terminal cat /etc/cloud-pass
98
+ @{lines } = Split To Lines ${creds }
99
+ ${line_num } = Get Length ${lines }
100
+ Should Be Equal As Integers ${line_num } 2
101
+ IF "${lines } [0 ]" != "${DPP_EMAIL_FW_ONLY } " or "${lines } [1 ]" != "${DPP_PASSWORD_FW_ONLY } "
102
+ Fail E-mail or password is different from expected
103
+ END
104
+ ${creds2 } = Execute Command In Terminal mc alias ls premium | grep "Key" | awk '{print $3}'
105
+ Should Be Equal ${creds } ${creds2 }
106
+ ... /etc/cloud-pass and mc credentials differ
107
+
108
+ E2E007.003 Check wrong credentials should not allow to log into DPP services
109
+ [Documentation] Entering wrong credentials shouldn't allow access to DPP
110
+ ... services and shouldn't be saved
111
+ Clean Up DTS Environment
112
+ Execute Command In Terminal export DTS_TESTING="true"
113
+ Write Into Terminal dts-boot
114
+
115
+ VAR
${DPP_EMAIL } =
[email protected] scope=TEST
116
+ VAR ${DPP_PASSWORD } = test-password scope=TEST
117
+ ${out } = Provide DPP Credentials
118
+ Should Contain ${out } Cannot log in to DPP server.
119
+ Should Not Contain ${out } Dasharo DPP credentials have been saved
120
+ Wait For Checkpoint ${DTS_CHECKPOINT }
121
+ Enter Shell In DTS
122
+ ${creds } = Execute Command In Terminal cat /etc/cloud-pass
123
+ Should Not Contain Any ${creds } ${DPP_EMAIL } ${DPP_PASSWORD }
124
+ ${creds2 } = Execute Command In Terminal
125
+ ... mc alias ls premium | grep "Key" | awk '{print $3}'
126
+ Should Not Contain Any ${creds2 } ${DPP_EMAIL } ${DPP_PASSWORD }
127
+
128
+ E2E007.004 Check correct credentials should allow to log into DPP services
129
+ [Documentation] Entering correct credentials should allow access to DPP
130
+ ... services
131
+ Clean Up DTS Environment
132
+ # We need to simulate supported platform
133
+ Export Shell Variables For Emulation
134
+ ... UEFI Update
135
+ ... DPP
136
+ ... ${DTS_PLATFORM_VARIABLES } [odroid-h4-plus]
137
+ ... ${DTS_CONFIG_REF }
138
+ Write Into Terminal dts-boot
139
+
140
+ ${out } = Provide DPP Credentials
141
+ Should Contain ${out } Dasharo Pro Package (DPP): YES
142
+ Wait For Checkpoint ${DTS_CHECKPOINT }
143
+ Enter Shell In DTS
144
+ ${rc } = Execute Command In Terminal And Return RC mc ls premium
145
+ Should Be Equal As Integers ${rc } 0
146
+ ... mc command failed to list buckets
147
+ ...
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
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
179
+
180
+ E2E007.007 Check special character should fail gracefully
181
+ [Documentation] Using e-mail or password with special characters e.g.
182
+ ... starting with `-` shouldn't result in unexpected errors
183
+ Clean Up DTS Environment
184
+ Execute Command In Terminal export DTS_TESTING="true"
185
+ Write Into Terminal dts-boot
186
+
187
+ VAR
${DPP_EMAIL } =
[email protected] scope=TEST
188
+ VAR ${DPP_PASSWORD } = -~!@#$%^&*"<>?;' scope=TEST
189
+ ${out } = Provide DPP Credentials
190
+ Should Contain ${out } Cannot log in to DPP server.
191
+ Should Not Contain ${out } Dasharo DPP credentials have been saved
192
+ Wait For Checkpoint ${DTS_CHECKPOINT }
193
+
194
+ E2E007.008 Check DPP credentials with access to only firmware
195
+ [Documentation] Those credentials should allow access only to DPP
196
+ ... firmware
197
+ Depends On Variable \${DPP_EMAIL_FW_ONLY}
198
+ Depends On Variable \${DPP_PASSWORD_FW_ONLY}
199
+ Clean Up DTS Environment
200
+ Export Shell Variables For Emulation
201
+ ... UEFI Update
202
+ ... DPP
203
+ ... ${DTS_PLATFORM_VARIABLES } [odroid-h4-plus]
204
+ ... ${DTS_CONFIG_REF }
205
+ Write Into Terminal dts-boot
206
+
207
+ VAR ${DPP_EMAIL } = ${DPP_EMAIL_FW_ONLY } scope=TEST
208
+ VAR ${DPP_PASSWORD } = ${DPP_PASSWORD_FW_ONLY } scope=TEST
209
+ ${out } = Provide DPP Credentials
210
+ Should Contain ${out } Dasharo Pro Package (DPP): YES
211
+ Should Contain ${out } DTS Extensions: NO
212
+
213
+ E2E007.009 Check DPP credentials with access to only extensions
214
+ [Documentation] Those credentials should allow access only to DTS
215
+ ... extensions
216
+ Depends On Variable \${DPP_EMAIL_EXTENSIONS_ONLY}
217
+ Depends On Variable \${DPP_PASSWORD_EXTENSIONS_ONLY}
218
+ Clean Up DTS Environment
219
+ Export Shell Variables For Emulation
220
+ ... UEFI Update
221
+ ... DPP
222
+ ... ${DTS_PLATFORM_VARIABLES } [odroid-h4-plus]
223
+ ... ${DTS_CONFIG_REF }
224
+ Write Into Terminal dts-boot
225
+
226
+ VAR ${DPP_EMAIL } = ${DPP_EMAIL_EXTENSIONS_ONLY } scope=TEST
227
+ VAR ${DPP_PASSWORD } = ${DPP_PASSWORD_EXTENSION_ONLY } scope=TEST
228
+ ${out } = Provide DPP Credentials
229
+ Should Contain ${out } Dasharo Pro Package (DPP): NO
230
+ Should Contain ${out } DTS Extensions: YES
231
+
232
+ E2E007.010 Check DPP credentials without DPP access
233
+ [Documentation] Those credentials shouldn't allow access to any firmware
234
+ ... or DTS extensions
235
+ Depends On Variable \${DPP_EMAIL_NO_ACCESS}
236
+ Depends On Variable \${DPP_PASSWORD_NO_ACCESS}
237
+ Clean Up DTS Environment
238
+ Export Shell Variables For Emulation
239
+ ... UEFI Update
240
+ ... DPP
241
+ ... ${DTS_PLATFORM_VARIABLES } [odroid-h4-plus]
242
+ ... ${DTS_CONFIG_REF }
243
+ Write Into Terminal dts-boot
244
+
245
+ VAR ${DPP_EMAIL } = ${DPP_EMAIL_NO_ACCESS } scope=TEST
246
+ VAR ${DPP_PASSWORD } = ${DPP_PASSWORD_NO_ACCESS } scope=TEST
247
+ ${out } = Provide DPP Credentials
248
+ Should Contain ${out } you may not have access to Dasharo Firmware
249
+ ${out } = Wait For Checkpoint And Press Enter ${DTS_CHECKPOINT }
250
+ Should Contain ${out } Dasharo Pro Package (DPP): NO
251
+ Should Contain ${out } DTS Extensions: NO
252
+
253
+ E2E007.011 Check DPP credentials with both DPP firmware and DTS extensions access
254
+ [Documentation] Those credentials should allow access to both DPP
255
+ ... firmware and DTS extensions
256
+ Clean Up DTS Environment
257
+ Export Shell Variables For Emulation
258
+ ... UEFI Update
259
+ ... DPP
260
+ ... ${DTS_PLATFORM_VARIABLES } [odroid-h4-plus]
261
+ ... ${DTS_CONFIG_REF }
262
+ Write Into Terminal dts-boot
263
+
264
+ ${out } = Provide DPP Credentials
265
+ Should Contain ${out } Dasharo Pro Package (DPP): YES
266
+ Should Contain ${out } DTS Extensions: YES
267
+
268
+ E2E008.001 Reboot UI Option Calls Reboot Command
269
+ [Documentation] Reboot (R) UI option should call mocked reboot command
270
+ Clean Up DTS Environment
271
+ Execute Command In Terminal export DTS_TESTING="true"
272
+ Write Into Terminal dts-boot
273
+ Wait For Checkpoint ${DTS_CHECKPOINT }
274
+ Write Bare Into Terminal R
275
+ Wait For Checkpoint common_mock: using reboot
276
+
277
+ E2E008.002 Poweroff UI Option Calls Poweroff Command
278
+ [Documentation] Poweroff (P) UI option should call mocked poweroff
279
+ Clean Up DTS Environment
280
+ Execute Command In Terminal export DTS_TESTING="true"
281
+ Write Into Terminal dts-boot
282
+ Wait For Checkpoint ${DTS_CHECKPOINT }
283
+ Write Bare Into Terminal P
284
+ Wait For Checkpoint common_mock: using poweroff
285
+
286
+ E2E008.003 Launch SSH Server UI Option Enables SSH Server Command
287
+ [Documentation] Launch SSH Server (K) UI option should start sshd server
288
+ Clean Up DTS Environment
289
+ Execute Command In Terminal export DTS_TESTING="true"
290
+ Execute Command In Terminal systemctl stop sshd
291
+ Write Into Terminal dts-boot
292
+ ${out } = Wait For Checkpoint ${DTS_CHECKPOINT }
293
+ Should Not Contain ${out } SSH status: ON
294
+ Write Bare Into Terminal K
295
+ ${out } = Wait For Checkpoint And Press Enter ${DTS_CONFIRM_CHECKPOINT }
296
+ Should Contain All ${out } Starting SSH server! Listening on IPs
297
+ ${out } = Wait For Checkpoint ${DTS_CHECKPOINT }
298
+ Should Contain ${out } SSH status: ON
299
+
300
+ E2E008.004 Enable Sending Logs UI Option Should Enable DTS Log Sending
301
+ [Documentation] Enable Sending DTS Logs (L) should enable automatic log
302
+ ... sending e.g. when entering shell
303
+ Clean Up DTS Environment
304
+ Execute Command In Terminal export DTS_TESTING="true"
305
+ Write Into Terminal dts-boot
306
+ ${out } = Wait For Checkpoint ${DTS_CHECKPOINT }
307
+ Should Contain ${out } L to enable
308
+ Write Bare Into Terminal L
309
+ ${out } = Wait For Checkpoint ${DTS_CHECKPOINT }
310
+ Should Contain ${out } L to disable
311
+ Write Bare Into Terminal S
312
+ Read Until Sending logs...
313
+
314
+ E2E009.001 DTS extensions are installed and can be used
315
+ [Documentation] Test that DTS extensions are installed after entering DPP
316
+ ... keys with access to them and that they can be used after.
317
+ Clean Up DTS Environment
318
+ Execute Command In Terminal export DTS_TESTING="true"
319
+ Write Into Terminal dts-boot
320
+
321
+ ${out } = Provide DPP Credentials
322
+ Should Contain ${out }
323
+ ... Package txeconfigtool-git-r0.core2_64.rpm have been installed successfully!
324
+ Wait For Checkpoint ${DTS_CHECKPOINT }
325
+ Enter Shell In DTS
326
+ ${rc } = Execute Command In Terminal And Return RC command -V txeconfigtool
327
+ Should Be Equal As Integers ${rc } 0
328
+
65
329
66
330
*** Keywords ***
67
331
# robocop: disable:0919
0 commit comments