----- Original Message -----
From: "Laszlo Hornyak" <lhornyak(a)redhat.com>
To: "engine-devel" <engine-devel(a)ovirt.org>
Sent: Thursday, June 27, 2013 11:23:42 AM
Subject: [Engine-devel] EngineEncryptionUtilsTest
Hi,
Just ran into an issue with EngineEncryptionUtilsTest, looks like it is
failing if the /etc/ovirt-engine/engine.conf does not have some keys. So of
course by now all of us added those keys, but isn't there a logical loop
here?
First the code should be tested, packaged and then installed and that's how
that file should get there. We should not build the tests on the assumption
that a version of oVirt is already installed.
What is your opinion?
It is my bad, I did not notice this exception as I had this file.
The problem is within EngineEncryptionUtils which is tested. It has the following:
static {
EngineLocalConfig config = EngineLocalConfig.getInstance();
keystoreFile = config.getPKIEngineStore().getAbsoluteFile();
keystorePassword = new
KeyStore.PasswordProtection(config.getPKIEngineStorePassword().toCharArray());
keystoreAlias = config.getPKIEngineStoreAlias();
truststoreFile = config.getPKITrustStore().getAbsoluteFile();
truststorePassword = new
KeyStore.PasswordProtection(config.getPKITrustStorePassword().toCharArray());
}
So when EngineEncryptionUtils is executed the EngineLocalConfig is initiated. I will add
another static variable to disable this block... I think it will be the simplest, unless
you have a better idea.
Thanks,
Alon