Shireesh Anjal has posted comments on this change.
Change subject: engine: Get Server fingerprint query
......................................................................
Patch Set 5: (2 inline comments)
I see that while I was reviewing patch-set 5, another patch-set has been sent.
The in-line comments are applicable to patch-set 6 as well.
....................................................
File
backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/GetServerFingerprintQueryTest.java
Line 28: private void setupMock() throws Exception {
Line 29: IConfigUtilsInterface confInstance = new
DefaultValuesConfigUtil();
Line 30: Config.setConfigUtils(confInstance);
Line 31: query = spy(new
GetServerFingerprintQuery<ServerParameters>(new ServerParameters(serverName)));
Line 32:
doReturn(fingerPrint).when(query).getServerFingerprint(serverName);
Sinec getQueryReturnValue() simply calls getServerFingerprint(), and you are
mocking it's behavior, nothing is really getting tested here. What should be
mocked is VdsInstallerSSH.getServerKeyFingerprint()
Line 33: }
Line 34:
Line 35: @Test
Line 36: public void testExecuteQueryCommnad() {
Line 38: String serverFingerprint = (String)
query.getQueryReturnValue().getReturnValue();
Line 39:
Line 40: assertNotNull(serverFingerprint);
Line 41: assertEquals(fingerPrint, serverFingerprint);
Line 42: }
Add another test method that tests what happens when
VdsInstallerSSH.getServerKeyFingerprint() throws an exception
--
To view, visit http://gerrit.ovirt.org/7034
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I8241e54a6f1b6d649a0c23f18ef6ba216670f005
Gerrit-PatchSet: 5
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Dhandapani Gopal <[email protected]>
Gerrit-Reviewer: Alon Bar-Lev <[email protected]>
Gerrit-Reviewer: Dhandapani Gopal <[email protected]>
Gerrit-Reviewer: Kanagaraj M <[email protected]>
Gerrit-Reviewer: Omer Frenkel <[email protected]>
Gerrit-Reviewer: Selvasundaram <[email protected]>
Gerrit-Reviewer: Shireesh Anjal <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches