Change in ovirt-engine[master]: core: @Spy gluster volume commands

amureini at redhat.com amureini at redhat.com
Thu Sep 29 12:39:59 UTC 2016


Allon Mureinik has submitted this change and it was merged.

Change subject: core: @Spy gluster volume commands
......................................................................


core: @Spy gluster volume commands

Cleaned up the gluster volume commands tests to use the @Spy
annotation in preparation for injecting the DAOs.

This patch includes:

- Changing the command being tested to be initialized once and
  annotated with @Spy and @InjectMocks.
- Thus, there is only only command object per test, so all the
  methods receiving commands as parameters were redone to use the
  member.
- Wherever possible, these now argument-less methods were annotated
  with @Before to avoid having to call them explicitly in each test.
- Since now the command under test injects its mocks, redundant
  InjectorRule calls were removed in order to avoid duplication.

Change-Id: I7c5f3a928c5837e275d8fdf06af3f200909183c4
Signed-off-by: Allon Mureinik <amureini at redhat.com>
---
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/gluster/AddBricksToGlusterVolumeCommandTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/gluster/CommitRemoveGlusterVolumeBricksCommandTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/gluster/CreateGlusterVolumeCommandTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/gluster/DeleteGlusterVolumeCommandTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/gluster/GlusterVolumeRemoveBricksCommandTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/gluster/RefreshGlusterVolumeDetailsCommandTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/gluster/ReplaceGlusterVolumeBrickCommandTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/gluster/StartGlusterVolumeCommandTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/gluster/StartGlusterVolumeProfileCommandTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/gluster/StartRebalanceGlusterVolumeCommandTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/gluster/StartRemoveGlusterVolumeBricksCommandTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/gluster/StopGlusterVolumeCommandTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/gluster/StopGlusterVolumeProfileCommandTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/gluster/StopRebalanceGlusterVolumeCommandTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/gluster/StopRemoveGlusterVolumeBricksCommandTest.java
15 files changed, 309 insertions(+), 370 deletions(-)

Approvals:
  Tal Nisan: Looks good to me, approved
  Allon Mureinik: Verified; Passed CI tests



-- 
To view, visit https://gerrit.ovirt.org/64611
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I7c5f3a928c5837e275d8fdf06af3f200909183c4
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Sahina Bose <sabose at redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>



More information about the Engine-commits mailing list