Fix tests for encryption keys

Adapt tests to the new check if the encryption keys are already present
on the system.