Alissa Bonas has uploaded a new change for review.

Change subject: restapi: fix lack of errorTranslator mock
......................................................................

restapi: fix lack of errorTranslator mock

Fix in REST test infrastucture the lack of mocking for
error translator in setupCreationExpectations method.
Before the fix, passing to this method cando=false
or execute=false caused NullPointerException during
the test execution because the error translator was not mocked.

Change-Id: Ibc315c1baf2e85005bde7b637e9fff870ef66aa4
Signed-off-by: Alissa Bonas <abo...@redhat.com>
---
M 
backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/AbstractBackendCollectionResourceTest.java
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/03/17003/1

diff --git 
a/backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/AbstractBackendCollectionResourceTest.java
 
b/backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/AbstractBackendCollectionResourceTest.java
index e6577fe..0af5283 100644
--- 
a/backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/AbstractBackendCollectionResourceTest.java
+++ 
b/backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/AbstractBackendCollectionResourceTest.java
@@ -247,9 +247,11 @@
                 
expect(taskResult.getActionReturnValue()).andReturn(taskReturn).anyTimes();
             } else {
                 
expect(taskResult.getExecuteFailedMessages()).andReturn(asList(FAILURE)).anyTimes();
+                setUpL10nExpectations(asList(FAILURE));
             }
         } else {
             
expect(taskResult.getCanDoActionMessages()).andReturn(asList(CANT_DO)).anyTimes();
+            setUpL10nExpectations(asList(CANT_DO));
         }
         expect(taskResult.getHasAsyncTasks()).andReturn(asyncTasks != 
null).anyTimes();
         if (asyncTasks != null) {


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

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

Reply via email to