Yaniv Bronhaim has uploaded a new change for review.

Change subject: Fixing backendHostResourceTests expectation results
......................................................................

Fixing backendHostResourceTests expectation results

After adding http://gerrit.ovirt.org/17194 that fixes the host mapping
in update() function, the tests were needed to be modify to expect for
the set value.
Checking for rootPassword, should be the rootPassword that set for the
action.

Change-Id: I00c710edac936f9d850740199824bd28a295fc87
Signed-off-by: Yaniv Bronhaim <ybron...@redhat.com>
---
M 
backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/BackendHostResourceTest.java
M 
backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/BackendResourceTest.java
2 files changed, 9 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/00/17500/1

diff --git 
a/backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/BackendHostResourceTest.java
 
b/backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/BackendHostResourceTest.java
index 05868d1..352d6a5 100644
--- 
a/backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/BackendHostResourceTest.java
+++ 
b/backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/BackendHostResourceTest.java
@@ -65,6 +65,7 @@
     private static final String ISCSI_PORT_STRING = "3260";
     private static final String ISCSI_IQN = "iqn.1986-03.com.sun:02:ori01";
     private static final String ISCSI_SERVER_ADDRESS = "shual1.eng.lab";
+    protected static final String ROOT_PASSWORD = "s3CR3t";
 
     public BackendHostResourceTest() {
         super(new BackendHostResource(GUIDS[0].toString(), new 
BackendHostsResource()));
@@ -181,7 +182,7 @@
         setUriInfo(setUpActionExpectations(VdcActionType.UpdateVds,
                                            UpdateVdsActionParameters.class,
                                            new String[] { "RootPassword" },
-                                           new Object[] { "" },
+                                           new Object[] { ROOT_PASSWORD },
                                            true,
                                            true));
 
@@ -203,7 +204,7 @@
         setUriInfo(setUpActionExpectations(VdcActionType.UpdateVds,
                 UpdateVdsActionParameters.class,
                 new String[] { "RootPassword" },
-                new Object[] { "" },
+                new Object[] { ROOT_PASSWORD },
                 true,
                 true));
 
@@ -233,7 +234,7 @@
         setUriInfo(setUpActionExpectations(VdcActionType.UpdateVds,
                 UpdateVdsActionParameters.class,
                 new String[] { "RootPassword" },
-                new Object[] { "" },
+                new Object[] { ROOT_PASSWORD },
                 true,
                 true));
 
@@ -267,7 +268,7 @@
         setUriInfo(setUpActionExpectations(VdcActionType.UpdateVds,
                                            UpdateVdsActionParameters.class,
                                            new String[] { "RootPassword" },
-                                           new Object[] { "" },
+                                           new Object[] { ROOT_PASSWORD },
                                            canDo,
                                            success));
 
@@ -361,8 +362,8 @@
 
         setUriInfo(setUpActionExpectations(VdcActionType.UpdateVds,
                                            UpdateVdsActionParameters.class,
-                                           new String[] { "RootPassword" },
-                                           new Object[] { "" },
+                                           new String[] { },
+                                           new Object[] { },
                                            true,
                                            true,
                                            false));
diff --git 
a/backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/BackendResourceTest.java
 
b/backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/BackendResourceTest.java
index 9fab7a6..c748f4d 100644
--- 
a/backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/BackendResourceTest.java
+++ 
b/backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/BackendResourceTest.java
@@ -1,6 +1,7 @@
 package org.ovirt.engine.api.restapi.resource;
 
 import static org.easymock.EasyMock.expect;
+import static 
org.ovirt.engine.api.restapi.resource.BackendHostsResourceTest.ROOT_PASSWORD;
 import static 
org.ovirt.engine.api.restapi.resource.BackendHostsResourceTest.getModel;
 import static 
org.ovirt.engine.api.restapi.resource.BackendHostsResourceTest.setUpEntityExpectations;
 
@@ -101,7 +102,7 @@
         resource.setUriInfo(setUpActionExpectations(VdcActionType.UpdateVds,
                 UpdateVdsActionParameters.class,
                 new String[] { "RootPassword" },
-                new Object[] { "" },
+                new Object[] { ROOT_PASSWORD },
                 false,
                 true,
                 "ACTION_TYPE_FAILED_IMPORT_DISKS_ALREADY_EXIST"));


-- 
To view, visit http://gerrit.ovirt.org/17500
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I00c710edac936f9d850740199824bd28a295fc87
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Yaniv Bronhaim <ybron...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to