Skip to content
Commit 4e06f23a authored by Kamil Dzieżyk's avatar Kamil Dzieżyk Committed by Richard Neill
Browse files

ewaol-tests: Add password reset to tests which access Guest VM user account



This patch resets the user account password on the Guest VM before and after the
relevant test suites execute. The password reset only occurs on virtualization
images which have been security hardened via the ewaol-security DISTRO_FEATURE.
The password reset is added by having security-specific code override the
extra_cleanup function which is called only by virtualization-specific code,
achieved via conditional appends to the test suites in the recipes.

With this mechanism for conditional inclusion of code to the BATS scripts
aligned across the test suites, the special substring-replace for
K3S_LOAD_VIRT_FUNCS has been dropped.

As the conditionally-appended code may not be just tests but also additional
function and variable definitions, the files are renamed from
"additional-*-tests.bats" to "append-*.bats.

This patch also adds a new runtime test internal variable 'TEST_GUEST_VM_NAME'
that takes the value assigned to test specific global variable:
'[CE|VIRT|K3S|UA]_TEST_GUEST_VM_NAME'.

Issue-Id: SCM-4421
Signed-off-by: Kamil Dzieżyk's avatarKamil Dziezyk <kamil.dziezyk@arm.com>
Signed-off-by: Richard Neill's avatarRichard Neill <richard.neill@arm.com>
Change-Id: Iaa7664e27812280238668fc0e7fea1c0fa018f34
parent 63b72429
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment