Alon Bar-Lev has uploaded a new change for review. Change subject: Partial Revert "engine: unit test for VdsDeploy.getEngineSSHPublicKey" ......................................................................
Partial Revert "engine: unit test for VdsDeploy.getEngineSSHPublicKey" This reverts commit 4b387e8d8ff0bc11ef6901ae9e4ecb9b12c938b8. Change-Id: I38fa07c853d202bb4bdcd83cdb658fff0864b758 Signed-off-by: Alon Bar-Lev <alo...@redhat.com> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VdsDeploy.java M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/VdsDeployTest.java 2 files changed, 11 insertions(+), 5 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/80/13080/1 diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VdsDeploy.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VdsDeploy.java index a9f902d..2a0d284 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VdsDeploy.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VdsDeploy.java @@ -197,7 +197,7 @@ * Return the engine ssh public key to install on host. * @return ssh public key. */ - protected static String getEngineSSHPublicKey() { + protected static String _getEngineSSHPublicKey() { final String keystoreFile = Config.<String>GetValue(ConfigValues.keystoreUrl); final String alias = Config.<String>GetValue(ConfigValues.CertAlias); final char[] password = Config.<String>GetValue(ConfigValues.keystorePass).toCharArray(); @@ -210,8 +210,14 @@ final Certificate cert = ks.getCertificate(alias); if (cert == null) { - log.info("Alias with name '"+alias+"' not found in "+keystoreFile); - log.info("aliases: " + StringUtils.join(EnumerationUtils.toList(ks.aliases()), ',')); + log.info( + String.format( + "Alias with name '%1$s' not found in '%2$s', aliases: %3$s", + alias, + keystoreFile, + StringUtils.join(EnumerationUtils.toList(ks.aliases()), ',') + ) + ); throw new KeyStoreException( String.format( "Failed to find certificate store '%1$s' using alias '%2$s'", @@ -343,7 +349,7 @@ new Callable<Object>() { public Object call() throws Exception { _parser.cliEnvironmentSet( NetEnv.SSH_KEY, - getEngineSSHPublicKey().replace("\n", "") + _getEngineSSHPublicKey().replace("\n", "") ); return null; }}, diff --git a/backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/VdsDeployTest.java b/backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/VdsDeployTest.java index 70041ce..93ba74e 100644 --- a/backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/VdsDeployTest.java +++ b/backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/VdsDeployTest.java @@ -15,6 +15,6 @@ @Test public void getEngineSSHPublicKey() { - Assert.assertNotNull(VdsDeploy.getEngineSSHPublicKey()); + Assert.assertNotNull(VdsDeploy._getEngineSSHPublicKey()); } } -- To view, visit http://gerrit.ovirt.org/13080 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I38fa07c853d202bb4bdcd83cdb658fff0864b758 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Alon Bar-Lev <alo...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches